Respawn private car
#4

Quote:
Originally Posted by KDyer
Посмотреть сообщение
Could you include the command /rac for us to look at?
You can get a chance to get it, of course, I just do not know if you will understand it because it's in Serbian.
Код:
YCMD:rac(playerid, params[], help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SendErrorMessage(playerid, "Nisi ulogovan/a ili nisi registrovan/a!");
	if(PI[playerid][Admin] < 1) return SendErrorMessage(playerid, "Niste ovlasceni da koristite ovu komandu.");
	if(RespawnVozila) return SCM(playerid, COLORSET, "Respawn je vec pokrenut.");
	new string[128];
	RespawnVozila = 1;
	format(string, sizeof(string), "[RESPAWN]{FFFFFF} Pokrenut je respawn. Sva vozila ce biti respawnovana za 20 sekudni! (Admin: %s)", Ime_Igraca(playerid));
    SendClientMessageToAll(SRPLAVA, string);
    format(nellys, sizeof(nellys), "{FBE204}[INFO] Admin %s je pokrenuo respawn", Ime_Igraca(playerid));
	AdminPoruka(COLOR_WHITE, nellys);
	SetTimer("Respawn", 20000, false);
	return 1;
}

forward Respawn();
public Respawn()
{
	new bool:unwanted[MAX_VOZILA];
    foreach(new i : Player)
    {
        if(IsPlayerInAnyVehicle(i))
        {
            unwanted[GetPlayerVehicleID(i)]=true;
            if(GetPlayerVehicleID(i) == 403 || GetPlayerVehicleID(i) == 514 || GetPlayerVehicleID(i) == 515)
            {
                new vehicleid = GetPlayerVehicleID(i);
                if(IsTrailerAttachedToVehicle(vehicleid)) return 0;
            }
        }
    }
    for(new car = 0; car < MAX_VOZILA; car++)
    {
        if(!unwanted[car]) SetVehicleToRespawn(car);
    }
    return 1;
}
Quote:
Originally Posted by kingmk
Посмотреть сообщение
Try this.

Код:
CMD:rac(playerid, params[])
{
       for(new v = 1; v < MAX_VEHICLES; v++)
       {
              SetVehicleToRespawn(v);
       }
       return 1;
}
I hope i helped u.
It does not work again: D Again respawned vehicles used
Reply


Messages In This Thread
Respawn private car - by dzonymontana - 24.02.2018, 20:27
Re: Respawn private car - by KDyer - 24.02.2018, 21:53
Re: Respawn private car - by kingmk - 25.02.2018, 08:46
Re: Respawn private car - by dzonymontana - 25.02.2018, 15:59

Forum Jump:


Users browsing this thread: 1 Guest(s)