04.06.2015, 08:08
this is my code
if I enter in second checkpoint the first code is returned that is I am given $25000 instead of $20000.
please help
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInCheckpoint(playerid) == pizza_cp1)
{
new model = GetVehicleModel(GetPlayerVehicleID(playerid));
if(model == 448)
{
GivePlayerMoney(playerid, 25000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
SendClientMessage(playerid,COLOR_RED,"Recieved $25000!");
DisablePlayerCheckpoint(playerid);
}
return 0;
}
if(IsPlayerInCheckpoint(playerid) == pizza_cp2)
{
new model = GetVehicleModel(GetPlayerVehicleID(playerid));
if(model == 448)
{
GivePlayerMoney(playerid, 20000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
SendClientMessage(playerid,COLOR_RED,"Recieved $20000!");
DisablePlayerCheckpoint(playerid);
}
return 0;
}
return 1;
}
please help