Check if in same vehicle
#1

Quick question here, I couldn't find an example in search.

With using a command, how could I go about checking if both players are in the same vehicle?
Reply
#2

Try this, I think it should work.
pawn Код:
new player1carid = GetPlayerVehicleID(playerid);
new player2carid = GetPlayerVehicleID(playerid2); //Replace playerid2 with the id of player 2!
if (player1carid == player2carid)
{
  //They are in the same car! Do stuff here
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)