29.03.2015, 16:50
PHP код:
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;
}