Except - 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: Except (
/showthread.php?tid=111451)
Except -
Mike Garber - 01.12.2009
How do I except something from a command/function?
Like, I'll explain it easy, If I want something done for all, EXCEPT myself?
Well, basicly what I'm trying to do, Is to get a var from the closest vehicle.
The problem is that I get the var from my own vehicle, because It's the closest vehicle.
I want it for the closest vehicle, EXCEPT mine.
Re: Except -
dice7 - 02.12.2009
In the loop which searches the closest vehicle
pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) == vehicleid) //the variable used in your loop which goes through vehicles
{
continue; //skips the current loop
}
}