11.10.2012, 11:02
I have problem.
How can i fix it.
It keep spamming
How can i fix it.
It keep spamming
pawn Код:
public OnPlayerLoadGoods(playerid)
{
KillTimer(LoadGoodsT[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, "Goods Loaded!, Head to the next checkpoint!");
TogglePlayerControllable(playerid, 1);
MissionStatus[playerid] = 2;
return 1;
}
public OnPlayerLoadGoodsEx(playerid)
{
new str[128];
KillTimer(LoadGoodsT[playerid]);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_YELLOW, "You finished delivering the goods, You receive $1000!");
format(str, sizeof(str), "%s has completed mission delivering %s", GetName(playerid), iMissionText[playerid]);
SendClientMessageToAll(COLOR_YELLOW, str);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 2);
GivePlayerMoney(playerid, 1000);
MissionStatus[playerid] = 0;
return 1;
}
public CheckTrailerEx(playerid)
{
if (GetPlayerVehicleSeat(playerid) == 0)
{
switch (GetVehicleModel(GetPlayerVehicleID(playerid)))
{
case VehicleFlatbed, VehicleDFT30, VehicleCementTruck:
if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return 1;
case VehicleLineRunner, VehicleTanker, VehicleRoadTrain:
{
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
if(MissionStatus[playerid] == -1)
{
SendClientMessage(playerid, COLOR_YELLOW, "You bring the trailer back!");
SendClientMessage(playerid, COLOR_ORANGE, "Now back to work!");
GameTextForPlayer(playerid, "~w~Trailer ~g~Back!!", 3500, 3);
MissionStatus[playerid] = 1;
SetPlayerCheckpoint(playerid, ucx[playerid], ucy[playerid], ucz[playerid], 7);
}
}
else if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
DisablePlayerCheckpoint(playerid);
MissionStatus[playerid] = -1;
GameTextForPlayer(playerid, "~w~Trailer ~r~Lost!!", 3500, 3);
SendClientMessage(playerid, COLOR_YELLOW, "Your trailer split up, Pick it up!");
SendClientMessage(playerid, COLOR_ORANGE, "You have 30 seconds to pick it up!");
HaveItElse[playerid] = SetTimerEx("FailTrailerEx", 30000, false, "d", playerid);
}
}
}
}
return 1;
}
public FailTrailerEx(playerid)
{
SendClientMessage(playerid, COLOR_ORANGE, "You lost the trailer!");
SendClientMessage(playerid, COLOR_RED, "Mission failed!");
Truckers_StopWork(playerid);
return 1;
}