Admin Vehicle
#1

i am using lux admin how can i create vehicles for admins only..
i made a try..

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  new PlayerName[24];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  new vehicleid = GetPlayerVehicleID(playerid);

  if(newstate == PLAYER_STATE_DRIVER)
  {
   if(vehicleid == AdminCar1)
   {
     if(IsPlayerAdminLevel(playerid,1))
     {
		  RemovePlayerFromVehicle(playerid);
  		  SendClientMessage(playerid, 0x33AA33AA, "I'm sorry, but this car has been reserved for Admins");
     }
       return 1;
   }

}
  
  {
   if(vehicleid == AdminCar2)
   {
     if(IsPlayerAdminLevel(playerid,2))
     {
	  	RemovePlayerFromVehicle(playerid);
  		SendClientMessage(playerid, 0x33AA33AA, "I'm sorry, but this car has been reserved for Admins");
     }
       return 1;
   }
}
  {
   if(vehicleid == AdminCar3)
   {
     if(IsPlayerAdminLevel(playerid,3))
     {
       RemovePlayerFromVehicle(playerid);
  	   SendClientMessage(playerid, 0x33AA33AA, "I'm sorry, but this car has been reserved for Admins");
		
     }
       return 1;
   }

}
  {
   if(vehicleid == AdminCar4)
   {
     if(IsPlayerAdminLevel(playerid,4))
     {
	  	RemovePlayerFromVehicle(playerid);
 		SendClientMessage(playerid, 0x33AA33AA, "I'm sorry, but this car has been reserved for Admins");
     }
       return 1;
   }
}

  return 1;
}
#endif
Reply


Messages In This Thread
Admin Vehicle - by Niko_boy - 11.03.2011, 06:14
Re: Admin Vehicle - by Tadeo - 11.03.2011, 07:01
Re: Admin Vehicle - by [WF]Demon - 11.03.2011, 07:25
Re: Admin Vehicle - by Tadeo - 11.03.2011, 07:42
Re: Admin Vehicle - by [WF]Demon - 11.03.2011, 07:54
Re: Admin Vehicle - by Niko_boy - 11.03.2011, 13:02
Re: Admin Vehicle - by Niko_boy - 11.03.2011, 15:06
Re: Admin Vehicle - by Niko_boy - 12.03.2011, 05:27
Re: Admin Vehicle - by admantis - 12.03.2011, 06:13

Forum Jump:


Users browsing this thread: 2 Guest(s)