respawned with occupied vehicle?
#3

Try this:
PHP код:
CMD:respawnarmy(playerid)
{
    if(
PlayerInfo[playerid][pAdmin] < 1) return SendClientMessageEx(playeridCOLOR_WHITE"Dibutuhkan admin LVL 1+");
    for(new 
x;x<sizeof(ARMYVehicles);x++)
    {
        if(!
IsVehicleOccupied(ARMYVehicles[x])
             
SetVehicleToRespawn(ARMYVehicles[x]);
    }
    
SendClientMessageToAll(COLOR_REALRED,"[Information] {FFFFFF}Kendaraan faction ARMY telah Direspawn.");
    return 
1;

You were passing the iterator to the parameter of the IsVehicleOccupied function, whereas you needed to pass the vehicle ID stored in the ARMYVehicles array, simply change !IsVehicleOccupied(x) to !IsVehicleOccupied(ARMYVehicles[x]).
Reply


Messages In This Thread
respawned with occupied vehicle? - by Dirda - 15.02.2018, 09:46
Re: respawned with occupied vehicle? - by PepsiCola23 - 15.02.2018, 10:39
Re: respawned with occupied vehicle? - by Eoussama - 15.02.2018, 10:44
Re: respawned with occupied vehicle? - by Mugala - 15.02.2018, 10:54
Re: respawned with occupied vehicle? - by Dirda - 16.02.2018, 04:29
Re: respawned with occupied vehicle? - by PepsiCola23 - 16.02.2018, 08:58
Re: respawned with occupied vehicle? - by RogueDrifter - 16.02.2018, 09:13
Re: respawned with occupied vehicle? - by MEW273 - 16.02.2018, 09:40
Re: respawned with occupied vehicle? - by RogueDrifter - 16.02.2018, 09:51
Re: respawned with occupied vehicle? - by Astralis - 16.02.2018, 09:56

Forum Jump:


Users browsing this thread: 1 Guest(s)