Fixed.. but i got another error :v
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
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.");
}
}
if(IsCapturing[playerid][auspro] == 1)
{
if(IsPlayerInVehicle(playerid, auspro))
{
DisablePlayerCheckpoint(playerid);
IsCapturing[playerid][auspro] = 0;
TextStats(playerid);
Savestatus(playerid);
format(text, sizeof(text), "~r~%s~w~ has Captured ~r~ Australia 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(auspro);
SetPlayerScore(playerid, GetPlayerScore(playerid)+6);
TogglePlayerAllDynamicCPs(playerid, 1);
}
else
{
DisablePlayerCheckpoint(playerid);
SCM(playerid, RED, "You're not in the Australia Prototype.");
}
}
if(IsCapturing[playerid][arabpro] == 1)
{
if(IsPlayerInVehicle(playerid, arabpro))
{
DisablePlayerCheckpoint(playerid);
IsCapturing[playerid][arabpro] = 0;
TextStats(playerid);
Savestatus(playerid);
format(text, sizeof(text), "~r~%s~w~ has Captured ~r~Arabian 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(arabpro);
SetPlayerScore(playerid, GetPlayerScore(playerid)+6);
TogglePlayerAllDynamicCPs(playerid, 1);
}
else
{
DisablePlayerCheckpoint(playerid);
SCM(playerid, RED, "You're not in the Arabian Prototype.");
}
}
if(IsCapturing[playerid][sovpro] == 1)
{
if(IsPlayerInVehicle(playerid, sovpro))
{
DisablePlayerCheckpoint(playerid);
RemovePlayerFromVehicle(playerid);
TextStats(playerid);
Savestatus(playerid);
format(text, sizeof(text), "~r~%s~w~ has Captured ~r~Soviet prototype ~w~for his team!", pName(playerid));
IsCapturing[playerid][sovpro] = 0;
SCM(playerid, C_GREEN, "Congratulations! You got +6 score and +6000 cash!");
GivePlayerMoney(playerid, 6000);
SetVehicleToRespawn(sovpro);
SetPlayerScore(playerid, GetPlayerScore(playerid)+6);
TogglePlayerAllDynamicCPs(playerid, 1);
}
else
{
DisablePlayerCheckpoint(playerid);
SCM(playerid, RED, "You're not in the Soviet Prototype.");
}
}
if(IsCapturing[playerid][eurapro] == 1)
{
if(IsPlayerInVehicle(playerid, eurapro))
{
DisablePlayerCheckpoint(playerid);
format(text, sizeof(text), "~r~%s~w~ has Captured ~r~Erusia prototype ~w~for his team!", pName(playerid));
IsCapturing[playerid][eurapro] = 0;
RemovePlayerFromVehicle(playerid);
TextStats(playerid);
Savestatus(playerid);
SCM(playerid, C_GREEN, "Congratulations! You got +6 score and +6000 cash!");
GivePlayerMoney(playerid, 6000);
SetVehicleToRespawn(eurapro);
SetPlayerScore(playerid, GetPlayerScore(playerid)+6);
TogglePlayerAllDynamicCPs(playerid, 1);
}
else
{
DisablePlayerCheckpoint(playerid);
SCM(playerid, RED, "You're not in the Erusia Prototype.");
}
}
return 1;
}