Any other methodes to do this?
#1

Hello guys, so I was wondering if there could be something that acronyms the long code lines which often gives errors when compiling

PHP код:
    new VehID GetPlayerVehicleID(playerid);
    if(
newstate == PLAYER_STATE_DRIVER && VehID == VIPVEH1 || VehID == VIPVEH2 || VehID == VIPVEH3 || VehID == VIPVEH4 || VehID == VIPVEH5 || VehID == VIPVEH6 || VehID == VIPVEH7 || VehID == VIPVEH8 || VehID == VIPVEH9 || VehID == VIPVEH10 || VehID == VIPVEH11 || VehID == VIPVEH12 || VehID == VIPVEH13 || VehID == VIPVEH14 || VehID == VIPVEH15 || VehID == VIPVEH16 || VehID == VIPVEH17 || VehID == VIPVEH18 || VehID == VIPVEH19 || VehID == VIPVEH20)){
        if(
VIPInfo[playerid][VIPLevel] > 0){
            
SendClientMessage(playeridYELLOW"[VIP]: Welcome to VIP Vehicle");
            return 
1;
        }
        else{
            
ErrorMessages(playerid1);
            
RemovePlayerFromVehicle(playerid);
        }
    } 
is there anything I can do to sum up that long line of code ?(newstate == Play.....)
Reply


Messages In This Thread
Any other methodes to do this? - by Eoussama - 07.10.2016, 20:14
Re: Any other methodes to do this? - by EtayJ - 07.10.2016, 20:17
Re: Any other methodes to do this? - by AbyssMorgan - 07.10.2016, 20:35
Re: Any other methodes to do this? - by Vince - 07.10.2016, 20:56
Re: Any other methodes to do this? - by Eoussama - 07.10.2016, 21:12
Re: Any other methodes to do this? - by Vince - 07.10.2016, 21:16
Re: Any other methodes to do this? - by Eoussama - 07.10.2016, 21:45
Re: Any other methodes to do this? - by AndySedeyn - 07.10.2016, 22:05

Forum Jump:


Users browsing this thread: 1 Guest(s)