2 Problems - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 2 Problems (
/showthread.php?tid=74334)
2 Problems -
Alec24 - 21.04.2009
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?
pawn Код:
...
for(new i=0; i<21;i++){
SetPlayerScore(i,0);
if(!IsPlayerInVehicle(i,i)){
DestroyVehicle(i);
}
}
...
2) if a player exits a car they should be fined and put back in the car they got out of, but it doesnt.
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;
}
Thanks.