CMD:rc(playerid, params[]) { if (APlayerData[playerid][PlayerLevel] >= 1) { new str[128], bool:vehicle[MAX_VEHICLES], AdminName[24]; GetPlayerName(playerid, AdminName, sizeof(AdminName)); format(str, sizeof(str), "{00FF00}O Administrador {FFFFFF}%s {00FF00}resetou todos os veiculos sem uso!", 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(!Cargavariavel) SetVehicleToRespawn(j); } } } return true; } |
CMD:rc(playerid) {
if (APlayerData[playerid][PlayerLevel] >= 1) {
new str[128], bool:vehicle[MAX_VEHICLES], AdminName[24];
GetPlayerName(playerid, AdminName, sizeof(AdminName));
format(str, sizeof(str), "{00FF00}O Administrador {FFFFFF}%s {00FF00}resetou todos os veiculos sem uso!", 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(!Cargavariavel) {
SetVehicleToRespawn(j);
}
}
}
return 1;
}
if(!vehicle[j]){
if(!Cargavariavel)
return SetVehicleToRespawn(j);
}
}
}
return true;
}
static bool:Veiculo[MAX_VEHICLES];
for(new j = 1; j < MAX_VEHICLES; j++)
{
if(!GetVehicleModel(j)) continue;
Veiculo[j] = false;
for(new i; i < GetMaxPlayers(); i ++)
{
if(IsPlayerInVehicle(i, j))
{
Veiculo[j] = true;
break;
}
}
if(!Veiculo[j])
SetVehicleToRespawn(j);
}
if(!vehicle[j]){
if(!Cargavariavel) {
SetVehicleToRespawn(j);
}
}
}
return true;
}
CMD:rc(playerid, params[])
{
if (APlayerData[playerid][PlayerLevel] >= 1)
{
new str[128], bool:vehicle[MAX_VEHICLES], AdminName[24];
GetPlayerName(playerid, AdminName, sizeof(AdminName));
format(str, sizeof(str), "{00FF00}O Administrador {FFFFFF}%s {00FF00}resetou todos os veiculos sem uso!", AdminName);
SendClientMessage(playerid, -1, str);
static bool:Veiculo[MAX_VEHICLES];
for(new j = 1; j < MAX_VEHICLES; j++)
{
if(!GetVehicleModel(j)) continue;
Veiculo[j] = false;
for(new i; i < GetMaxPlayers(); i ++)
{
if(IsPlayerInVehicle(i, j))
{
Veiculo[j] = true;
break;
}
}
if(!Veiculo[j])
SetVehicleToRespawn(j);
}
}