03.11.2011, 20:24
i try to do that when the first player enter to the check point will get 90k
the second 60k
and the third 30k
but this way not working
the second 60k
and the third 30k
but this way not working
PHP код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
else if(race[playerid] == 33)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(finish[playerid] == 6)
{
new pname[128];
new string[126];
DisablePlayerRaceCheckpoint(i);
GetPlayerName(playerid, pname, sizeof(pname));
GivePlayerMoney(playerid, 30000);
format(string, sizeof(string), "[Player] %s is the 3st that end the race and got 30000$.", pname);
SendClientMessageToAll(Orange, string);
SetVehicleToRespawn(car);
Enteredrace[i] = 2;
}
if(finish[playerid] == 5)
{
new pname[128];
new string[126];
DisablePlayerRaceCheckpoint(playerid);
GetPlayerName(playerid, pname, sizeof(pname));
GivePlayerMoney(playerid, 60000);
format(string, sizeof(string), "[Player] %s is the 2st that end the race and got 60000$.", pname);
SendClientMessageToAll(Orange, string);
finish[i] = 6;
}
else
{
new pname[128];
new string[126];
DisablePlayerRaceCheckpoint(playerid);
GetPlayerName(playerid, pname, sizeof(pname));
GivePlayerMoney(playerid, 90000);
format(string, sizeof(string), "[Player] %s is the 1st that end the race and got 90000$.", pname);
SendClientMessageToAll(Orange, string);
finish[i] = 5;
}
}
}
}