▲Denny▲
Умник
Не удаляется checkpoint
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]);
AvtoObj[playerid] = -1;
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(AvtoObj[playerid], 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);
}
PHP:
case dAvtozav:
{
if(!response) return 1;
switch(listitem)
{
case 0:
{
if(pinfo[playerid][avtojob] == 1) return SendClientMessage(playerid, -1, MESWARNING"Вы уже работаете на автозаводе!");
pinfo[playerid][avtojob] = 1;
switch(pinfo[playerid][sex])
{
case 1: SetPlayerSkin(playerid, 27);
case 2: SetPlayerSkin(playerid, 157);
}
avtojobchek[playerid][0] = CreateDynamicCP(avtocheck[0][0], avtocheck[0][1], avtocheck[0][2], 1.0, -1, -1, playerid);
return SendClientMessage(playerid, -1, MESWARNING"Вы начали работу на автозаводе!");
}
case 1:
{
if(pinfo[playerid][avtojob] == 0) return SendClientMessage(playerid, -1, MESERROR"Вы не работаете на автозаводе!");
new string[144];
format(string, sizeof(string), MESWARNING"Вы успешно окончили рабочий день. Вы получили %i$!", pinfo[playerid][zarplata]);
pinfo[playerid][avtojob] = 0;
SetPlayerSkin(playerid, pinfo[playerid][cloth]);
pinfo[playerid][money] += pinfo[playerid][zarplata], pinfo[playerid][zarplata] = 0, GivePlayerMoney(playerid, pinfo[playerid][money]);
return SendClientMessage(playerid, -1, string);
}
}
PHP:
public OnPlayerEnterDynamicCP(playerid, STREAMER_TAG_CP checkpointid)
{
SendClientMessage(playerid, -1, "1");
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);
AvtoObj[playerid] = CreateObject(1098, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
AttachObjectToPlayer(AvtoObj[playerid], 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, AvtoObj[playerid]);
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, AvtoObj[playerid]);
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, AvtoObj[playerid]);
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;
}
return 1;
}
PHP:
