Respawn All Vehicles
#3

use this Code

PHP Code:
CMD:respawncars(playeridparams[])
{
    
//check if the player is a admin
    
LevelCheck(playerid4);
    for(new 
carscars MAX_VEHICLEScars++)
    {
        
LOOP_PLAYERS(i)
        {
            
PlayerPlaySound(i10570.00.00.0);
            if(
GetPlayerVehicleID(i) == cars)
            {
                if(
GetPlayerState(i) == PLAYER_STATE_DRIVER)
                {
                    if(
GetPlayerGAdminLevel(playerid) < GetPlayerGAdminLevel(i))
                    {
                        
SetVehicleToRespawn(cars);
                    }
                }
                else 
SetVehicleToRespawn(cars);
            }
            else 
SetVehicleToRespawn(cars);
        }
    }
    
GameTextForAll("~b~~h~~h~~h~Vehicles respawned"50003);
    new 
string[144];
    
format(stringsizeof(string), "You respawned all vehicles."ReturnPlayerName(playerid), playerid);
    
SendClientMessageToAll(COLOR_HOT_PINKstring);
    return 
1;

Reply


Messages In This Thread
Respawn All Vehicles - by Vizi10 - 15.04.2019, 21:09
Re: Respawn All Vehicles - by AdamsLT - 15.04.2019, 22:11
Re: Respawn All Vehicles - by BsLOUAY - 15.04.2019, 22:13
Re: Respawn All Vehicles - by AdamsLT - 16.04.2019, 07:44
Re: Respawn All Vehicles - by Vizi10 - 16.04.2019, 16:20

Forum Jump:


Users browsing this thread: 2 Guest(s)