Code don't get out the player in a vehicle
#1

the code don't get out a player in a vehicle if he is in a faction inferior of 12 and superior of 15
there is the all code :
PHP код:
new VehicleUniversity[6]; 
PHP код:
    VehicleUniversity[0] = AddStaticVehicle(431,1243.5908,-1814.1011,13.5219,192.1839,6,6);
    
VehicleUniversity[1] = AddStaticVehicle(431,1253.6360,-1808.4974,13.5206,187.4982,6,6);
    
VehicleUniversity[2] = AddStaticVehicle(479,1262.2723,-1795.9644,13.2041,176.6719,6,6);
    
VehicleUniversity[3] = AddStaticVehicle(479,1268.2578,-1795.9026,13.1933,185.7594,6,6);
    
VehicleUniversity[4] = AddStaticVehicle(479,1274.9191,-1795.9988,13.1908,183.1960,6,6); 
somewhere in public OnPlayerEnterVehicle
PHP код:
else if(IsPlayerInVehicle(playeridVehicleUniversity[0]))
        {
            if(
PlayerInfo[playerid][pFac] < 13 || PlayerInfo[playerid][pFac] > 15)
            {
                new 
Float:pos[3];
                 
GetPlayerPos(playeridpos[0], pos[1], pos[2]);
                
SetPlayerPos(playeridpos[0], pos[1], pos[2]);
                
SendClientMessage(playeridCOLOR_ORANGE" You can't start the engine as it belongs to the University School Staff.");
            }
            else if(
IsPlayerInVehicle(playeridVehicleUniversity[1]))
            {
                if(
PlayerInfo[playerid][pFac] < 13 && PlayerInfo[playerid][pFac] > 15)
                {
                    new 
Float:pos[3];
                       
GetPlayerPos(playeridpos[0], pos[1], pos[2]);
                       
SetPlayerPos(playeridpos[0], pos[1], pos[2]);
                       
SendClientMessage(playeridCOLOR_ORANGE" You can't start the engine as it belongs to the University School Staff.");
                }
            }
               else if(
IsPlayerInVehicle(playeridVehicleUniversity[2]))
              {
                if(
PlayerInfo[playerid][pFac] < 13 && PlayerInfo[playerid][pFac] > 15)
                {
                    new 
Float:pos[3];
                       
GetPlayerPos(playeridpos[0], pos[1], pos[2]);
                       
SetPlayerPos(playeridpos[0], pos[1], pos[2]);
                       
SendClientMessage(playeridCOLOR_ORANGE" You can't start the engine as it belongs to the University School Staff.");
                }
            }
               else if(
IsPlayerInVehicle(playeridVehicleUniversity[3]))
            {
                if(
PlayerInfo[playerid][pFac] < 13 && PlayerInfo[playerid][pFac] > 15)
                {
                    new 
Float:pos[3];
                    
GetPlayerPos(playeridpos[0], pos[1], pos[2]);
                    
SetPlayerPos(playeridpos[0], pos[1], pos[2]);
                    
SendClientMessage(playeridCOLOR_ORANGE" You can't start the engine as it belongs to the University School Staff.");
                }
            }
            else if(
IsPlayerInVehicle(playeridVehicleUniversity[4]))
               {
                  if(
PlayerInfo[playerid][pFac] < 13 && PlayerInfo[playerid][pFac] > 15)
                {
                    new 
Float:pos[3];
                       
GetPlayerPos(playeridpos[0], pos[1], pos[2]);
                       
SetPlayerPos(playeridpos[0], pos[1], pos[2]);
                       
SendClientMessage(playeridCOLOR_ORANGE" You can't start the engine as it belongs to the University School Staff.");
                    }
                }
            }
        } 
thanks for the help you will giving me.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)