Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Spawn Carros
- if (strcmp(cmd, "/destruirid", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] < 3)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando !");
- return true;
- }
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != DONO)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return true;
- }
- new counter = 0;
- new result;
- new plyName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, plyName, MAX_PLAYER_NAME);
- for(new i; i != MAX_VEHICLES; i++)
- {
- new dist = ChecarveiculoThiago(5, playerid, i);
- if(dist)
- {
- result = i;
- counter++;
- }
- }
- switch(counter)
- {
- case 0:
- {
- SendClientMessage(playerid, COLOR_GREY, " Não há nenhum carro nesse raio!");
- }
- case 1:
- {
- if(result < CAR_AMOUNT)
- {
- SendClientMessage(playerid, COLOR_GREY, "Você só pode destruir veículos criados");
- return true;
- }
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- DestroyVehicle(result);
- format(string, sizeof(string), "Você destruiu o veículo ID:[%d]", result);
- SendClientMessage(playerid, COLOR_GREY, string);
- if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
- {
- format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi destruido Por: ADM_Bot", result);
- ABroadCast(COLOR_YELLOW,string,1);
- }
- else
- {
- format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi destruido Por: %s", result, name);
- ABroadCast(COLOR_YELLOW,string,1);
- }
- }
- default:
- {
- SendClientMessage(playerid, COLOR_GREY, " Foram encontrados mais de um carro nesse raio");
- }
- }
- }
- return true;
- }
- if (strcmp(cmd, "/respawnid", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] < 3)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando !");
- return true;
- }
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != DONO)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return true;
- }
- new counter = 0;
- new result;
- new plyName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, plyName, MAX_PLAYER_NAME);
- for(new i; i != MAX_VEHICLES; i++)
- {
- new dist = ChecarveiculoThiago(5, playerid, i);
- if(dist)
- {
- result = i;
- counter++;
- }
- }
- switch(counter)
- {
- case 0:
- {
- SendClientMessage(playerid, COLOR_GREY, " Não há nenhum carro nesse raio!");
- }
- case 1:
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Você deu respawn no carro ID:[%d]", result);
- SendClientMessage(playerid, COLOR_GREY, string);
- if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
- {
- format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi respawnado Por: ADM_Bot", result);
- ABroadCast(COLOR_YELLOW,string,1);
- }
- else
- {
- format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi respawnado Por: %s", result, name);
- ABroadCast(COLOR_YELLOW,string,1);
- }
- SetVehicleToRespawn(result);
- }
- default:
- {
- SendClientMessage(playerid, COLOR_GREY, " Foram encontrados mais de um carro nesse raio");
- }
- }
- }
- return true;
- }
- if (strcmp(cmd, "/abastecerid", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] < 3)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando !");
- return true;
- }
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != DONO)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return true;
- }
- new counter = 0;
- new result;
- new plyName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, plyName, MAX_PLAYER_NAME);
- for(new i; i != MAX_VEHICLES; i++)
- {
- new dist = ChecarveiculoThiago(5, playerid, i);
- if(dist)
- {
- result = i;
- counter++;
- }
- }
- switch(counter)
- {
- case 0:
- {
- SendClientMessage(playerid, COLOR_GREY, " Não há nenhum carro nesse raio!");
- }
- case 1:
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Você abasteceu o carro ID:[%d]", result);
- SendClientMessage(playerid, COLOR_GREY, string);
- if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
- {
- format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi abastecido Por: Homem_Aranha, result);
- ABroadCast(COLOR_YELLOW,string,1);
- }
- else
- {
- format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi abastecido Por: %s", result, name);
- ABroadCast(COLOR_YELLOW,string,1);
- }
- Gas[result] = 100;
- }
- default:
- {
- SendClientMessage(playerid, COLOR_GREY, " Foram encontrados mais de um carro nesse raio");
- }
- }
- }
- return true;
- }
- if (strcmp(cmd, "/repararid", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] < 3)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando !");
- return true;
- }
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != DONO)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return true;
- }
- new counter = 0;
- new result;
- new plyName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, plyName, MAX_PLAYER_NAME);
- for(new i; i != MAX_VEHICLES; i++)
- {
- new dist = ChecarveiculoThiago(5, playerid, i);
- if(dist)
- {
- result = i;
- counter++;
- }
- }
- switch(counter)
- {
- case 0:
- {
- SendClientMessage(playerid, COLOR_GREY, " Não há nenhum carro nesse raio!");
- }
- case 1:
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Você reparou o carro ID:[%d]", result);
- SendClientMessage(playerid, COLOR_GREY, string);
- if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
- {
- format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi reparado Por: ADM_Bot", result);
- ABroadCast(COLOR_YELLOW,string,1);
- }
- else
- {
- format(string, sizeof(string), "AdmAviso: Carro ID:[%d] foi reparado Por: %s", result, name);
- ABroadCast(COLOR_YELLOW,string,1);
- }
- RepairVehicle(result);
- }
- default:
- {
- SendClientMessage(playerid, COLOR_GREY, " Foram encontrados mais de um carro nesse raio");
- }
- }
- }
- return true;
- }
- if(strcmp(cmd, "/respawncarros", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] < 4)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não está autorizado a usar este comando !");
- return true;
- }
- GetPlayerName(playerid, playername, sizeof(playername));
- if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
- {
- format(string, sizeof(string), "{FFFFFF}[{37E031}Atenção{FFFFFF}] Todos os carros foram para seus locais de inicio. By: ADM_Bot.");
- }
- else
- {
- format(string, sizeof(string), "{FFFFFF}[{37E031}Atenção{FFFFFF}] Todos os veículos foram para seus locais de inicio. By: {FFEA00}%s.", playername);
- }
- SendClientMessageToAll(COLOR_RCARRO,string);
- new bool:unwanted[CAR_AMOUNT];
- for(new player=0; player<MAX_PLAYERS; player++)
- {
- if(IsPlayerConnected(player) && IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
- }
- for(new car = 1; car <= CAR_AMOUNT; car++)
- {
- if(!unwanted[car]) SetVehicleToRespawn(car);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement