Help in getting car id
#1

[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.
Reply
#2

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
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)