15.02.2018, 10:44
Try this:
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]).
PHP код:
CMD:respawnarmy(playerid)
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessageEx(playerid, COLOR_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;
}

