04.07.2016, 20:08
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 :
somewhere in public OnPlayerEnterVehicle
thanks for the help you will giving me.
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);
PHP код:
else if(IsPlayerInVehicle(playerid, VehicleUniversity[0]))
{
if(PlayerInfo[playerid][pFac] < 13 || PlayerInfo[playerid][pFac] > 15)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the University School Staff.");
}
else if(IsPlayerInVehicle(playerid, VehicleUniversity[1]))
{
if(PlayerInfo[playerid][pFac] < 13 && PlayerInfo[playerid][pFac] > 15)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the University School Staff.");
}
}
else if(IsPlayerInVehicle(playerid, VehicleUniversity[2]))
{
if(PlayerInfo[playerid][pFac] < 13 && PlayerInfo[playerid][pFac] > 15)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the University School Staff.");
}
}
else if(IsPlayerInVehicle(playerid, VehicleUniversity[3]))
{
if(PlayerInfo[playerid][pFac] < 13 && PlayerInfo[playerid][pFac] > 15)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the University School Staff.");
}
}
else if(IsPlayerInVehicle(playerid, VehicleUniversity[4]))
{
if(PlayerInfo[playerid][pFac] < 13 && PlayerInfo[playerid][pFac] > 15)
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_ORANGE, " You can't start the engine as it belongs to the University School Staff.");
}
}
}
}