SA-MP Forums Archive
Help [+Rep] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help [+Rep] (/showthread.php?tid=607460)



Help [SOLVED] - Naresh - 20.05.2016

Thx, Solved!


Re: Help [+Rep] - TheSimpleGuy - 20.05.2016

Код:
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;
}



Re: Help [+Rep] - Naresh - 20.05.2016

Doest work


Re: Help [+Rep] - MBilal - 20.05.2016

Look at the Jeff Code about that.

http://forum.sa-mp.com/showpost.php?...81&postcount=4


Re: Help [+Rep] - Naresh - 20.05.2016

Thx it works fawlessly