pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 455)
{
GivePlayerMoney(playerid, 500);
GameTextForPlayer(playerid, "~g~Вие свършихте работата,Ще можете отново след 1 час!", 3000, 3);
SendClientMessage(playerid, 0x07C85CFF,"Вие свършихте работата и получихте 500$ за нея,Ще можете отново след 1 час");
SetTimerEx("Job", 3600000, false, "i", playerid);
SetVehicleToRespawn(513);
DisablePlayerCheckpoint(playerid);
truckjobrunning = 0;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 519)
{
GivePlayerMoney(playerid, 300);
GameTextForPlayer(playerid, "~g~Вие свършихте работата,Ще можете отново след 1 час!", 3000, 3);
SendClientMessage(playerid, 0x07C85CFF,"Вие свършихте работата и получихте 300$ за нея,Ще можете отново след 1 час");
SetTimerEx("Job", 3600000, false, "i", playerid);
SetVehicleToRespawn(1);
DisablePlayerCheckpoint(playerid);
flyjobrunning = 0;
SetPlayerPos(playerid, 1729.8932,-2415.7798,14.4727);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 532)
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint1))
{
SetPlayerCheckpoint(playerid, Checkpoint2, 7.0);
CreateObject(823,-231.8289,-1467.9810,4.9421,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint2))
{
SetPlayerCheckpoint(playerid, Checkpoint3, 7.0);
CreateObject(823,-193.9747,-1375.2502,4.7856,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint3))
{
SetPlayerCheckpoint(playerid, Checkpoint4, 7.0);
CreateObject(823,-246.0348,-1326.1063,8.9300,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint4))
{
SetPlayerCheckpoint(playerid, Checkpoint5, 7.0);
CreateObject(823,-407.1459,-1371.5518,23.6588,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint5))
{
SetPlayerCheckpoint(playerid, Checkpoint6, 7.0);
CreateObject(823,-564.7697,-1302.4977,22.5511,0,0,0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint6))
{
SetPlayerCheckpoint(playerid, Checkpoint7, 7.0);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Checkpoint7))
{
GivePlayerMoney(playerid, 300);
GameTextForPlayer(playerid, "~g~Вие свършихте работата и получихте 300$ за нея,Ще можете отново след 1 час!", 3000, 3);
SendClientMessage(playerid, 0x07C85CFF,"Вие свършихте работата и получихте 300$ за нея,Ще можете отново след 1 час");
SetTimerEx("Job", 3600000, false, "i", playerid);
SetVehicleToRespawn(2);
combinejobrunning = 0;
DisablePlayerCheckpoint(playerid);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 588)
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint1))
{
SetPlayerCheckpoint(playerid, HotPoint2, 7.0);
GameTextForPlayer(playerid, "~g~1 House done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint2))
{
SetPlayerCheckpoint(playerid, HotPoint3, 7.0);
GameTextForPlayer(playerid, "~g~2 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint3))
{
SetPlayerCheckpoint(playerid, HotPoint4, 7.0);
GameTextForPlayer(playerid, "~g~3 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint4))
{
SetPlayerCheckpoint(playerid, HotPoint5, 7.0);
GameTextForPlayer(playerid, "~g~4 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint5))
{
SetPlayerCheckpoint(playerid, Refillpoint, 7.0);
GameTextForPlayer(playerid, "~g~5 Houses done, refill your hotdogs at the marker!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Refillpoint))
{
SetPlayerCheckpoint(playerid, HotPoint6, 7.0);
GameTextForPlayer(playerid, "~g~Hotdogs refilled!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint6))
{
SetPlayerCheckpoint(playerid, HotPoint7, 7.0);
GameTextForPlayer(playerid, "~g~6 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint7))
{
SetPlayerCheckpoint(playerid, HotPoint8, 7.0);
GameTextForPlayer(playerid, "~g~7 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint8))
{
SetPlayerCheckpoint(playerid, HotPoint9, 7.0);
GameTextForPlayer(playerid, "~g~8 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint9))
{
SetPlayerCheckpoint(playerid, HotPoint10, 7.0);
GameTextForPlayer(playerid, "~g~9 Houses done!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint10))
{
SetPlayerCheckpoint(playerid, HotPoint11, 7.0);
GameTextForPlayer(playerid, "~g~10 Houses done, get back to the startpoint!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint11))
{
GivePlayerMoney(playerid, 300);
GameTextForPlayer(playerid, "~g~You collected a total of $800,-!", 3000, 3);
SendClientMessage(playerid, 0x07C85CFF,"Вие свършихте работата и получихте 300$ за нея,Ще можете отново след 1 час");
SetTimerEx("Job", 3600000, false, "i", playerid);
new veh;
veh = GetPlayerVehicleID(playerid);
SetVehicleToRespawn(veh);
DisablePlayerCheckpoint(playerid);
hotdog = 0;
}
}
}
return 1;}