26.04.2013, 16:34
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;
}
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?