▲Denny▲
Умник
PHP:
if(checkpointid == avtojobchek[playerid][0])
{
DestroyDynamicCP(avtojobchek[playerid][0]);
ApplyAnimation(playerid, "MISC", "pickup_box",2.5, 0, 0, 0, 2, 3);
ClearAnimations(playerid, 0);
ApplyAnimation(playerid, "CARRY", "CRRY_PRTIAL",0, 1, 0, 0, 0,0);
AttachObjectToPlayer(1098, playerid, 0.0, 0.7, 0.0, 0.0, 0.0, 0.0);
new i = random(3) + 1;
avtojobchek[playerid][1] = CreateDynamicCP(avtocheck[i][0], avtocheck[i][1], avtocheck[i][2], 1.0, -1, -1, playerid);
return 1;
}
if(checkpointid == avtojobchek[playerid][1])
{
ClearAnimations(playerid, 0);
DestroyDynamicCP(avtojobchek[playerid][1]);
DestroyPlayerObject(playerid, 1098);
ApplyAnimation(playerid, "VENDING", "VEND_USE", 2.5, 1, 0, 0, 0, 0, 0);
avtoanim[playerid] = SetTimerEx("Avtozavod", 10000, false, "i", playerid);
return 1;
}
if(checkpointid == avtojobchek[playerid][2])
{
ClearAnimations(playerid, 0);
DestroyDynamicCP(avtojobchek[playerid][2]);
DestroyPlayerObject(playerid, 1098);
ApplyAnimation(playerid, "WEAPONS", "SHP_2H_RET_S", 2.5, 1, 0, 0, 0, 0, 0);
avtoanim[playerid] = SetTimerEx("Avtozavod", 10000, false, "i", playerid);
return 1;
}
if(checkpointid == avtojobchek[playerid][3])
{
ClearAnimations(playerid, 0);
DestroyDynamicCP(avtojobchek[playerid][3]);
DestroyPlayerObject(playerid, 1098);
ApplyAnimation(playerid, "VENDING", "VEND_USE", 2.5, 1, 0, 0, 0, 0, 0);
avtoanim[playerid] = SetTimerEx("Avtozavod1", 10000, false, "i", playerid);
avtojobchek[playerid][0] = CreateDynamicCP(avtocheck[0][0], avtocheck[0][1], avtocheck[0][2], 1.0, -1, -1, playerid);
return 1;
}
PHP:
forward Avtozavod1(playerid);
public Avtozavod1(playerid)
{
new string[80];
ClearAnimations(playerid);
pinfo[playerid][zarplata] += binfo[GetPVarInt(playerid, "bid")][price1][0];
format(string, sizeof(string), MESWARNING"Вы заработали %i$!", pinfo[playerid][zarplata]);
return SendClientMessage(playerid, -1, string);
}
forward Avtozavod(playerid);
public Avtozavod(playerid)
{
new i = random(3) + 5;
if(truefalse[playerid] == 1) i = random(3) + 9, avtojobchek[playerid][3] = CreateDynamicCP(avtocheck[i][0], avtocheck[i][1], avtocheck[i][2], 1.0, -1, -1, playerid);
avtojobchek[playerid][2] = CreateDynamicCP(avtocheck[i][0], avtocheck[i][1], avtocheck[i][2], 1.0, -1, -1, playerid);
ClearAnimations(playerid);
ApplyAnimation(playerid, "MISC", "pickup_box",2.5, 0, 0, 0, 2, 3);
AttachObjectToPlayer(1098, playerid, 0.0, 0.7, 0.0, 0.0, 0.0, 0.0);
ClearAnimations(playerid, 0);
return ApplyAnimation(playerid, "CARRY", "CRRY_PRTIAL",0, 1, 0, 0, 0,0);
}
