[Ajuda] Respawn
#1

Galera tenho um comando de respawn, meu server e Truck e os players trabalham com trailers, quando dou /respawn os trailers tb sгo "respawnados", alguem poderia me ajudar?

Meu comando:
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), "» {999999}Administrador {FFFFFF}%s {00FF00}respawnou {999999}todos os veiculos desoucupados!", AdminName);
        SendClientMessage(playerid, -1, 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])
                if(!IsTrailerAttachedToVehicle(j))
                    SetVehicleToRespawn(j);
        }
    }
    else
        SendClientMessage(playerid, -1, "» {FF0000}Vocк nгo tem permissгo para usar este comando!");

    return true;
}
Reply


Messages In This Thread
Respawn - by GHLEMES - 20.06.2014, 17:49
Re: Respawn - by CrazyHelp - 20.06.2014, 18:05
Re: Respawn - by GHLEMES - 20.06.2014, 20:11
Re: Respawn - by GHLEMES - 21.06.2014, 02:14
Re: Respawn - by lHesoyaml - 21.06.2014, 10:59
Re: Respawn - by GHLEMES - 21.06.2014, 19:25
Re: Respawn - by lHesoyaml - 22.06.2014, 18:44

Forum Jump:


Users browsing this thread: 3 Guest(s)