Vehicle Help?
#1

Hello i was wondering if anyone can help me. I am using the following code in my script which allows team 1 (LSPD) to only use certain vehicles. If someone else attempts to enter (team 0 ) it gives them a message and doesn't let them in. However the PD cannot enter the vehicles either. It all compiles and it seems fine to me? Can anyone help?
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  if(GetPlayerTeam(playerid) == 0 && vehicleid == PD[1], PD[2]/*, PD[3], PD[4], PD[5], PD[6], PD[7], PD[8], PD[9], PD[10], PD[11], PD[12], PD[13], PD[14], PD[15], PD[16], PD[17]*/)
  {
     new Float:Pos[3];
     GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
     SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
     SendClientMessage(playerid, RED, "Server: This vehicle is for the Police Dept only!");
  }
  return 1;
}
Reply
#2

It seams fine , just make sure you set correctly the team of PD , make sure (with a print or something like this) that PD members have Team == 1.
Reply
#3

I checked it all, and it seems fine. I don't understand what the issue is :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)