[Ajuda] Respawn
#1

pawn Код:
CMD:respawn(playerid, params[])
{
    if(APlayerData[playerid][PlayerLevel] >= 4)
    {
        new str[128], bool:vehicle[MAX_VEHICLES], AdminName[24];
        GetPlayerName(playerid, AdminName, sizeof(AdminName));
        format(str, sizeof(str), "{57C7D4}!-INFO-!  {E0C060}Administrador %s respawnou todos os veiculos desoucupados!", AdminName);
        SendClientMessage(playerid, 0xFFFF00FF, str);
        for(new j = 1; GetVehicleModel(j); ++j)
        {
            vehicle[j] = false;
            for(new i, p = GetMaxPlayers(); i < p; ++i)
            {
                if(!IsPlayerInAnyVehicle(i) || !IsPlayerConnected(i)) continue;
                if(IsPlayerInVehicle(i, j))
                {
                    vehicle[j] = true;
                    break;
                }
            }
            if(!vehicle[j]) SetVehicleToRespawn(j);
        }
    }
    else
        SendClientMessage(playerid, -1, "{FF0000}Vocк nгo tem permissгo para isso!");
    return 1;
}
Esse comando ai ele respawna os veiculos desoucupados.

Atй ai normal, mais se o jogador estiver com o trailer atachado, o trailer vai para o local de origem.
Queria que o trailer continuasse ali atachado no veiculo, apenas os trailers e veiculos descoupados iriam respawnar.

Como ficaria?
Reply
#2

Ninguem?
Reply
#3

Acho que isso nгo й possнvel.
Reply
#4

Acho que й sim. Algueem ?
Reply
#5

Isto deve ajudar:

IsTrailerAttachedToVehicle
Reply
#6

Sim eu conheзo a funзгo, mais to em duvida onde colocala.
Reply
#7

Usa
pawn Код:
if (!IsTrailerAttachedToVehicle(vehicleid))
Reply
#8

Quote:
Originally Posted by Delete_
Посмотреть сообщение
Usa
pawn Код:
if (!IsTrailerAttachedToVehicle(vehicleid))
Valeu pia.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)