[Ajuda] Respawn Veiculos
#1

ai Galera to com um probleminha de Respawn tipo no meu servidor tem um comando que da RV somente nos carros desocupados mais o problema e que se alguem tiver usando um caminhгo e tive com um (trailer) usando normal e alguem da o rv nos carros desocupados queria saber se б alguma forma de nгo respawnar o (trailer) do caminhгo
quem pude ajuda so dizer ai galera vlw
Reply
#2

IsTrailerAttachedToVehicle
ou
GetVehicleTrailer
Reply
#3

ixi mano eu achei pela logica mais num deu ainda e respawnado

Olha meu comando

pawn Код:
if(strcmp(cmd, "/rvu", true) == 0)
    {
        if(pAdmin[playerid] > 0)
        {
            for(new v = 0; v < MAX_VEHICLES; v++)
            {
                if(!IsVehicleOccupied(v)) SetVehicleToRespawn(v);
            }
            SendClientMessage(playerid, Verde, "Veнculos desocupados respawnados!");
            format(string, sizeof(string), "O(A) ADM %s (%d) respawnou todos os veнculos desocupados.", PlayerName(playerid), playerid);
            SendClientMessageToAll(tcadm, string);
        }
        return 1;
    }
e a Stock e essa Olha como coloquei isso mais nem deu certo

pawn Код:
stock IsVehicleOccupied(vehicleid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerState(i) == PLAYER_STATE_DRIVER || GetPlayerState(i) == PLAYER_STATE_PASSENGER
|| IsTrailerAttachedToVehicle(vehicleid))
            {
                if(GetPlayerVehicleID(i) == vehicleid)
                {
                    return 1;
                }
            }
        }
    }
    return 0;
}

tente me ajudar ai lek pf esse ta foda ja tinha feito isso mais num deu tentei di nv e num deu
Reply
#4

Код:
if(!strcmp(var0, "/respawnveiculos", true) && IsPlayerAdmin(playerid))
	{
		new var4 = 0;
		for(var4 = 0; var4 < 500; var4++)
		{
			SetVehicleToRespawn(var4);
		}
		SendClientMessage(playerid, 0xFFFF00AA, "[NNF] Admin: Vocк respawnou todos os veнculos do jogo.");
		return 1;
	}
Reply
#5

isso tem nada vк cara. mais vlw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)