Help [+Rep]
#2

Код:
CMD:respawnall(playerid, params[])
{
    SendAdminText(playerid, "/arac", params); // Show the command to all admins online
    if(APlayerData[playerid][LoggedIn] == false) return 0; // If player is not logged in return nothing
    if (APlayerData[playerid][AdminLevel] == 0) return 0; // If player is not admin return nothing
    for(new x=0; x<MAX_VEHICLES; x++) // Loop all vehicles in the server
    {
        // Check if there is vehicles in use icluding trialers
        if(!IsVehicleOccupied(x) || GetVehicleTrailer(x) == 1)
        {
             if(!IsTrailerAttachedToVehicle(x)) SetVehicleToRespawn(x); // Respawn all vehicles
        }
    }
    SendClientMessageToAll(0xFFFFFFFF, "{FF0000}[WARNING]: {FFFFFF}All Unused Vehicles And Trailers Are Respawned.");
    // Note: You must define the IsVehicleOccupied function
    return 1;
}
Reply


Messages In This Thread
Help [SOLVED] - by Naresh - 20.05.2016, 03:19
Re: Help [+Rep] - by TheSimpleGuy - 20.05.2016, 03:59
Re: Help [+Rep] - by Naresh - 20.05.2016, 04:46
Re: Help [+Rep] - by MBilal - 20.05.2016, 06:07
Re: Help [+Rep] - by Naresh - 20.05.2016, 06:38

Forum Jump:


Users browsing this thread: 1 Guest(s)