19.08.2016, 16:33
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(playerid != INVALID_PLAYER_ID)
{
new text[128];
if(IsCapturing[playerid][usapro] == 1)
{
if(IsPlayerInVehicle(playerid, usapro))
{
DisablePlayerCheckpoint(playerid);
IsCapturing[playerid][usapro] = 0;
format(text, sizeof(text), "~r~%s~w~ has Captured ~r~USA prototype ~w~for his team!", pName(playerid));
RemovePlayerFromVehicle(playerid);
SCM(playerid, C_GREEN, "Congratulations! You got +6 score and +6000 cash!");
GivePlayerMoney(playerid, 6000);
SetVehicleToRespawn(usapro);
SetPlayerScore(playerid, GetPlayerScore(playerid)+6);
TogglePlayerAllDynamicCPs(playerid, 1);
TextStats(playerid);
Savestatus(playerid);
}
else
{
DisablePlayerCheckpoint(playerid);
SCM(playerid, RED, "You're not in the USA Prototype.");
}
}
}
}
....