21.04.2009, 17:36
1) At the start of a race (destruction derby) I would like for all the cars with no players to be 'destroyed' but with this it will detroy all the cars even if a player is in it. I can see why this isnt working but does anyone know a solution?
2) if a player exits a car they should be fined and put back in the car they got out of, but it doesnt.
Thanks.
pawn Код:
...
for(new i=0; i<21;i++){
SetPlayerScore(i,0);
if(!IsPlayerInVehicle(i,i)){
DestroyVehicle(i);
}
}
...
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
//SetPlayerHealth(playerid,0.0);
new v = (playerid+1);
SendClientMessage(playerid,RED,"Do Not Exit A Vehicle During The Derby! (-$50)");
PutPlayerInVehicle(playerid,v,0);
GivePlayerMoney(playerid,-50);
return 1;
}