[HELP]Key Car
#1

Help me!!
Hello everyone I am doing a system to privatize the voicoli but I do not understand where mistake!!
PHP код:
new EliPula1,EliPula2,EliPula3,EliPula4,EliPula5
PHP код:
    EliPula1 CreateVehicle(497, -587.89432605.231265.8545, -94.1400, -1, -1100);
    
EliPula2 CreateVehicle(497, -588.13172581.343865.8545, -89.5200, -1, -1100);
    
EliPula3 CreateVehicle(497, -571.60022581.207365.8545, -89.7600, -1, -1100);
    
EliPula4 CreateVehicle(497, -570.96942604.815465.8545, -89.7600, -1, -1100);
    
EliPula5 CreateVehicle(497, -560.36132593.635565.8870, -88.7400, -1, -1100); 
OnPlayerStateChange:
PHP код:
if(vehicleid == EliPula1 || EliPula2 || EliPula3 || EliPula4 || EliPula5)
    {
    if(
pInfo[playerid][GradiPolizia] >= || pInfo[playerid][pAdmin] >= )
    {
    }
    else
    {
    
RemovePlayerFromVehicle(playerid);
    
SendClientMessage(playeridCOLOR_GREY,"Polizia: You don't have the key car!");
    }
    } 
Reply
#2

Quote:
Originally Posted by falco3205
Посмотреть сообщение
PHP код:
if(vehicleid == EliPula1 || EliPula2 || EliPula3 || EliPula4 || EliPula5
this won't work.

do it like this
PHP код:
if(vehicleid == EliPula1 || vehicleid == EliPula2 || vehicleid == EliPula3 || vehicleid == EliPula4 || vehicleid == EliPula5
you could also do this in a switch, looks better
Reply
#3

Thanks!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)