SA-MP Forums Archive
Help in getting car id - 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: Help in getting car id (/showthread.php?tid=87721)



Help in getting car id - HeX123 - 21.07.2009

[b]Hi.I see GetPlayerVehicleID.I am codding IsABike public.And i need getting car id.I tryed GetPlayerCarID but not work.Please help me.
Example :
pawn Код:
new carid = GetPlayerCarID;
forward IsABike(carid);

public IsABike(carid)
7
if((carid = 522))
return 1;
}
pawn Код:
strcmp.... /openwindows

if(IsABike)
SendClientMessage.....Bike has not have windows to open it.



Re: Help in getting car id - James_Alex - 21.07.2009

mybe try this
pawn Код:
public IsABike(carid)
{
  if(GetVehiclesModel(carid) == 522)
  {
    return 1;
  }
  return 0;
}
and the command should be
pawn Код:
if(strcmp(cmd, "/openwindow", true) == 0)
{
  if(IsABike(GetPlayerVehicleID(playerid))
  {
    // blablablabla...
  }
}


ot try "GetPlayerVehicleID3


Re: Help in getting car id - HeX123 - 21.07.2009

OK i find it.It is GetVehicleModel.Thanks for help.