Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:respawndetran(playerid, params[])
- {
- new string[128];
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pMembro] != 34 && PlayerInfo[playerid][pLider] != 34)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não é um Detran!");
- return 1;
- }
- if(!IsPlayerInHQMec(playerid))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "O carro e você precisam estar na sua HQ!");
- return 1;
- }
- 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 = ChecarveiculoBNS(5, playerid, i);
- if(dist)
- {
- result = i;
- counter++;
- }
- }
- switch(counter)
- {
- case 0:
- {
- SendClientMessage(playerid, COLOR_GREY, "Não há nenhum carro nesse por perto!");
- }
- case 1:
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Você Entregou o carro ID:[%d] A sua HQ!", result);
- SendClientMessage(playerid, COLOR_GREY, string);
- SetVehicleToRespawn(result);
- }
- default:
- {
- SendClientMessage(playerid, COLOR_GREY, "Dois carros estão muito pertos.Afaste-os Mais!");
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement