onplayennter
#1

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
PHP код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
else if(
race[playerid] == 33)
{
for(new 
0MAX_PLAYERSi++)
{
if(
finish[playerid] == 6)
{
new 
pname[128];
new 
string[126];
DisablePlayerRaceCheckpoint(i);
GetPlayerName(playeridpnamesizeof(pname));
GivePlayerMoney(playerid30000);
format(stringsizeof(string), "[Player] %s is the 3st that end the race and got 30000$."pname);
SendClientMessageToAll(Orangestring);
SetVehicleToRespawn(car);
Enteredrace[i] = 2;
}
if(
finish[playerid] == 5)
{
new 
pname[128];
new 
string[126];
DisablePlayerRaceCheckpoint(playerid);
GetPlayerName(playeridpnamesizeof(pname));
GivePlayerMoney(playerid60000);
format(stringsizeof(string), "[Player] %s is the 2st that end the race and got 60000$."pname);
SendClientMessageToAll(Orangestring);
finish[i] = 6;
}
else
{
new 
pname[128];
new 
string[126];
DisablePlayerRaceCheckpoint(playerid);
GetPlayerName(playeridpnamesizeof(pname));
GivePlayerMoney(playerid90000);
format(stringsizeof(string), "[Player] %s is the 1st that end the race and got 90000$."pname);
SendClientMessageToAll(Orangestring);
finish[i] = 5;
}
}
}

Reply


Messages In This Thread
onplayennter - by marik1322 - 03.11.2011, 20:24
Re: onplayennter - by LZLo - 03.11.2011, 21:21

Forum Jump:


Users browsing this thread: 1 Guest(s)