//Spawn Carros if(strcmp(cmd, "/respawncarros", true) == 0 || strcmp(cmd, "/rc", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando !"); return 1; } if(admtrampando[playerid] < 1) { SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/profadmin)"); return 1; } GetPlayerName(playerid, playername, sizeof(playername)); format(string, sizeof(string), "[BPT] Todos os carros foi para seus locais de inicio. By: %s.", playername); SendClientMessageToAll(0xFFC801C8,string); new bool:unwanted[CAR_AMOUNT]; for(new player=0; player<MAX_PLAYERS; player++) { if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; } } for(new car = 1; car <= CAR_RESPAW; car++) { if(!unwanted[car]) SetVehicleToRespawn(car); } } return 1; } |
if(strcmp(cmd, "/respawncarros", true) == 0 || strcmp(cmd, "/rc", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando !");
return 0;
}
if(admtrampando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/profadmin)");
return 0;
}
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "[BPT] Todos os carros foi para seus locais de inicio. By: %s.", playername);
SendClientMessageToAll(0xFFC801C8,string);
new bool:unwanted[CAR_AMOUNT];
for(new player=0; player<MAX_PLAYERS; player++)
{
if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
}
for(new car = 1; car <= CAR_RESPAW; car++)
{
if(!unwanted[car]) SetVehicleToRespawn(car);
}
}
return 1;
}
if(strcmp(cmdtext,"/resetar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando !");
return 0;
}
if(admtrampando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/profadmin)");
return 0;
}
ResetarVeiculos();
}
return 1;
}
stock ResetarVeiculos()
{
new string[128]="Os Veнculos forгo Respawnados Automaticamente";
SendClientMessageToAll(Aviso, string);
new inVeh;
for( new i = 0; i < MAX_VEHICLES; i++ )
{
inVeh = false;
for( new j = 0; j < MAX_PLAYERS; j++ )
{
if(IsPlayerInVehicle( j, i ))
{
inVeh = true;
break;
}
}
if(!inVeh)
{
SetVehicleToRespawn(i);
}
}
}
if(strcmp(cmd, "/respawncarros", true) == 0 || strcmp(cmd, "/rc", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando !");
return 1;
}
if(admtrampando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/profadmin)");
return 1;
}
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "[BPT] Todos os carros foi para seus locais de inicio. By: %s.", playername);
SendClientMessageToAll(0xFFC801C8,string);
new bool:unwanted[CAR_AMOUNT];
for(new player=0; player<MAX_PLAYERS; player++)
{
if(IsPlayerInAnyVehicle(player))
{
unwanted[GetPlayerVehicleID(player)]=true;
return 1;
}
}
for(new car = 1; car <= CAR_RESPAW; car++)
{
if(!unwanted[car])
{
SetVehicleToRespawn(car);
return 1;
}
}
}
return 1;
}
if(strcmp(cmd, "/rc", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
for(new p = 0; p < MAX_PLAYERS; p++)
if(!IsPlayerInVehicle(p, vehicleid) && GetPlayerState(p) == PLAYER_STATE_DRIVER)
{
for( new i = 0; i < MAX_VEHICLES; i++ )
{
SetVehicleToRespawn(i);
SendClientMessageToAll(0xFF0000AA,"Algum Administrador Deu Respawn Em Todos Os Veiculos Desocupados");
return 1;
}
}
}
else
{
SendClientMessage(playerid,0xFF0000AA"Vocк nгo й adm logado na rcon");
return 1;
}
}