SA-MP Forums Archive
Check if the given id is in the same car as yours. [UNSOLVED] - 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: Check if the given id is in the same car as yours. [UNSOLVED] (/showthread.php?tid=89571)



Check if the given id is in the same car as yours. [UNSOLVED] - Hot - 02.08.2009

The title speaks by itself.

I don't know how to use check it, it's for a kidnap command, the command I made bvy my self, but this is the last thing I need to complete it.

Can some1 say me how?


Re: Check if the given id is in the same car as yours. - Jefff - 02.08.2009

Код:
if(GetPlayerVehicleID(playerid) == GetPlayerVehicleID(giveplayerid))



Re: Check if the given id is in the same car as yours. - Hot - 02.08.2009

Код:
C:\Documents and Settings\Convidado\Desktop\SA-MP\filterscripts\Empregos.pwn(460) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: Check if the given id is in the same car as yours. [UNSOLVED] - Jefff - 02.08.2009

Line in map? :P


Re: Check if the given id is in the same car as yours. - member - 02.08.2009

Quote:
Originally Posted by Jefff
Код:
if(GetPlayerVehicleID(playerid) == GetPlayerVehicleID(giveplayerid))
Maybe try something like this?
pawn Код:
new MyVehicle, OtherGuysVehicle;
MyVehicle = GetPlayerVehicleID(playerid);
OtherGuysVehicle = GetPlayerVehicleID(giveplayerid); //change giveplayerid to whatever u use
if(MyVehicle == OtherGuysVehicle)
{
    // do something
}
Might be the same thing, but worth a try.


Re: Check if the given id is in the same car as yours. - NeRoSiS - 02.08.2009

Quote:
Originally Posted by [B2K
Hustler ]
Quote:
Originally Posted by Jefff
Код:
if(GetPlayerVehicleID(playerid) == GetPlayerVehicleID(giveplayerid))
Maybe try something like this?
pawn Код:
new MyVehicle, OtherGuysVehicle;
MyVehicle = GetPlayerVehicleID(playerid);
OtherGuysVehicle = GetPlayerVehicleID(giveplayerid); //change giveplayerid to whatever u use
if(MyVehicle == OtherGuysVehicle)
{
    // do something
}
Might be the same thing, but worth a try.
It does exactly the same as Jeff's does...


Re: Check if the given id is in the same car as yours. [UNSOLVED] - member - 02.08.2009

Just thought it might dodge the tag mismatch warning.