Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/daradmin", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] < 0 && ServerOwner[playerid] != 1)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não tem autorização para usar esse comando.");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "[INFO] Use: /daradmin [id] [Nivel]");
- return 1;
- }
- new para1;
- new level;
- para1 = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "[INFO] Use: /daradmin [id] [Nivel]");
- return 1;
- }
- level = strval(tmp);
- GetPlayerName(para1, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "{FFFFFF}Você foi promovido para level {0FFFFF}%d{FFFFFF} de Administrador - Por {0FFFFF}%s", level, sendername);
- SendClientMessage(para1, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "{FFFFFF}Você promoveu o(a) {0FFFFF}%s{FFFFFF} Para o level {0FFFFF}%d{FFFFFF} de Administrador.", giveplayer,level);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- if(IsPlayerConnected(para1))
- // OnPlayerDisconnect
- EmTutorial[playerid] = 0;
- if( tirohitman[ playerid ] ^ 9999 && reason ^ 2 ){
- new string[ 128 ];
- tirohitman[ playerid ] = 9999;
- tirotime[ playerid ] = 0;
- PlayerInfo[ playerid ][ pJailed ] = 2;
- PlayerInfo[ playerid ][ pJailTime ] = 50 * 60;
- format( string, sizeof string, "O player %s foi preso automaticamente por 50 minutos. Motivo: Anti-RPG.", PlayerName( playerid ) );
- SendClientMessageToAll( COLOR_LIGHTRED, string );
- }
- if(DeuVDP[playerid] == 1)
- {
- new string[ 128 ];
- DeuVDP[playerid] = 0;
- PlayerInfo[ playerid ][ pJailed ] = 2;
- PlayerInfo[ playerid ][ pJailTime ] = 50 * 60;
- format( string, sizeof string, "O player %s foi preso automaticamente por 50 minutos. Motivo: Anti-RPG.", PlayerName( playerid ) );
- SendClientMessageToAll( COLOR_LIGHTRED, string );
- }
- DeletePVar(playerid, "PlayerMorto");
- PlayerInfo[playerid][pOnline] = 0;
- SalvarPlayer(playerid);
- new caller = Mobile[playerid];
- new nome[24], str[50];
- GetPlayerName(playerid, nome, 24);
- format(str, sizeof str, "%s - Arara", nome);
- dini_BoolSet("Araras.ini", str, Infoa[playerid][Arara]);
- format(str, sizeof str, "%s - Racao", nome);
- dini_BoolSet("Araras.ini", str, Infoa[playerid][Racao]);
- format(str, sizeof str, "%s - Grande", nome);
- dini_IntSet("Araras.ini", str, Infoa[playerid][Grande]);
- casaid[playerid] = 9999;
- PlayerInBank[ playerid ] = false;
- PegarAtividade( playerid );
- KillTimer(tima[playerid]);
- TextDrawHideForPlayer(playerid,____[playerid]);
- TextDrawDestroy(____[playerid]);
- for( new i; i < MAX_PLAYERS; i ++ ){
- if( IsPlayerConnected( i ) ) {
- if( Espiando[ i ] == playerid ){
- if( PlayerInfo[ i ][ pAdmin ] > 0 ){
- PlayerInfo[ i ][ pTeam ] = 0;
- TogglePlayerSpectating( i, false );
- SpawnPlayer( i );
- SendClientMessage( i, -1, "O player deslogou." );
- Espiando[ i ] = -1;
- }
- }
- }
- }
- Espiando[ playerid ] = -1;
- if(caller != 9999)
- {
- if(caller < 255)
- {
- SendClientMessage(caller, COLOR_GRAD2, "A ligação caiu...");
- CellTime[caller] = 0;
- CellTime[playerid] = 0;
- Mobile[caller] = 9999;
- }
- Mobile[playerid] = 9999;
- CellTime[playerid] = 0;
- }
- if(HireCar[playerid] > 0)
- {
- VTrancado[HireCar[playerid]] = 0;
- UnLockCar(HireCar[playerid]);
- SetVehicleToRespawn(HireCar[playerid]);
- HireCar[playerid] = 0;
- }
- if (PlayerInfo[playerid][pBarraca] != 0)
- {
- RemoveBarraca(playerid);
- }
- if (PlayerInfo[playerid][pParedao] != 0)
- {
- RemoveParedao(playerid);
- }
- if(pRoadblock[playerid] != 0)
- {
- RemoveRoadblock(playerid);
- }
- if(SpikeInfo[playerid][sCreated] != 0)
- {
- RemoveRoadPregos(playerid);
- }
- if(pRoadBloq[playerid] != 0)
- {
- RemoveRoadBloq(playerid);
- }
- if(PlayerInfo[playerid][pCone] != 0)
- {
- RemoveCone(playerid);
- }
- if(pRoadRampa[playerid][1] != 0) RemovePlataforma(playerid);
- /*if(PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pAdmin] != 3000)
- {
- format(gstring, sizeof(gstring), "~p~%s: ~r~~h~OFF", PlayerName(playerid));
- for(new i=0; i<MaiorID; i++)
- {
- if(IsPlayerConnected(i))
- {
- GameTextForPlayer(i, gstring , 1000, 1);
- }
- }
- }*/
- if(InfoWiiu[playerid][NumSenha] != 999)
- {
- InfoWiiu[playerid][NumSenha] = 999;
- strmid(InfoWiiu[playerid][PergSenha], "Vazia", 0, strlen("Vazia"), 255);
- SenhasAtendimento --;
- }
- switch(reason)
- {
- case 0: format(gstring, sizeof(gstring), "***%s saiu do servidor por erro de conexão ou crash.", PlayerName(playerid));
- case 1: format(gstring, sizeof(gstring), "***%s saiu do servidor por vontade propria.", PlayerName(playerid));
- case 2: format(gstring, sizeof(gstring), "***%s Saiu do servidor kickado ou banido.", PlayerName(playerid));
- }
- ProxDetector(100.0, playerid, gstring,0xFFBB77AA,0xFFBB77AA,0xFFBB77AA,0xFFBB77AA,0xFFBB77AA);
- gActivePlayers[playerid]--;
- if(MudarNickAceito[playerid] == 1)
- {
- MudarNickAceito[playerid] = 0;
- }
- if(ProvocoCasarao[playerid] == 1)
- {
- GangZoneStopFlashForAll(GZCasarao);
- GangZoneShowForAll(GZCasarao, 0xFFCCFF96);
- GuerranoCasarao = 0;
- ProvocoCasarao[playerid] = 0;
- donocasarao = 0;
- Dominando[playerid] = 0;
- KillTimer(TempoGuerraCasarao);
- }
- if(ProvocoEstacao[playerid] == 1)
- {
- GangZoneStopFlashForAll(GZEstacao);
- GangZoneShowForAll(GZEstacao, 0xFFCCFF96);
- GuerranaEstacao = 0;
- ProvocoEstacao[playerid] = 0;
- donoestacao = 0;
- Dominando[playerid] = 0;
- KillTimer(TempoGuerraEstacao);
- }
- if(ProvocoCemiterio[playerid] == 1)
- {
- GangZoneStopFlashForAll(GZCemiterio);
- GangZoneShowForAll(GZCemiterio, 0xFFCCFF96);
- GuerranoCemiterio = 0;
- ProvocoCemiterio[playerid] = 0;
- donoCemiterio = 0;
- Dominando[playerid] = 0;
- KillTimer(TempoGuerraCemiterio);
- }
- if(ProvocoShop[playerid] == 1)
- {
- GangZoneStopFlashForAll(GZShop);
- GangZoneShowForAll(GZShop, 0xFFCCFF96);
- GuerranoShop = 0;
- ProvocoShop[playerid] = 0;
- donoShop = 0;
- Dominando[playerid] = 0;
- KillTimer(TempoGuerraShop);
- }
- if(Provococonst[playerid] == 1)
- {
- GangZoneStopFlashForAll(GZconst);
- GangZoneShowForAll(GZconst, 0xFFCCFF96);
- Guerranoconst = 0;
- Provococonst[playerid] = 0;
- donoconst = 0;
- Dominando[playerid] = 0;
- KillTimer(TempoGuerraconst);
- }
- if(ProvocoPark[playerid] == 1)
- {
- GangZoneStopFlashForAll(GZPark);
- GangZoneShowForAll(GZPark, 0xFFCCFF96);
- GuerranoPark = 0;
- ProvocoPark[playerid] = 0;
- donoPark = 0;
- Dominando[playerid] = 0;
- KillTimer(TempoGuerraPark);
- }
- if(ProvocoSkate[playerid] == 1)
- {
- GangZoneStopFlashForAll(GZSkate);
- GangZoneShowForAll(GZSkate, 0xFFCCFF96);
- GuerranoSkate = 0;
- ProvocoSkate[playerid] = 0;
- donoskate = 0;
- Dominando[playerid] = 0;
- KillTimer(TempoGuerraSkate);
- }
- for(new i = 0; i < MaiorID; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(TaxiAccepted[i] < 999)
- {
- if(TaxiAccepted[i] == playerid)
- {
- TaxiAccepted[i] = 999;
- GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
- TaxiCallTime[i] = 0;
- DisablePlayerCheckpoint(i);
- }
- }
- else if(LocalizarTime[i] < 999)
- {
- if(LocalizarAccepted[i] == playerid)
- {
- LocalizarTime[i] = 999;
- GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
- //TaxiCallTime[i] = 0;
- DisablePlayerCheckpoint(i);
- }
- }
- else if(CopsrondaAccepted[i] < 999)
- {
- if(CopsrondaAccepted[i] == playerid)
- {
- CopsrondaAccepted[i] = 999;
- GameTextForPlayer(i, "~w~Policial o player~n~~r~Deixou o jogo", 5000, 1);
- CopsrondaCallTime[i] = 0;
- DisablePlayerCheckpoint(i);
- }
- }
- else if(MedicAccepted[i] < 999)
- {
- if(MedicAccepted[i] == playerid)
- {
- MedicAccepted[i] = 999;
- GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
- MedicCallTime[i] = 0;
- DisablePlayerCheckpoint(i);
- }
- }
- else if(MechanicAccepted[i] < 999)
- {
- if(MechanicAccepted[i] == playerid)
- {
- MechanicAccepted[i] = 999;
- GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
- MechanicCallTime[i] = 0;
- DisablePlayerCheckpoint(i);
- }
- }
- else if(BusAccepted[i] < 999)
- {
- if(BusAccepted[i] == playerid)
- {
- BusAccepted[i] = 999;
- GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
- BusCallTime[i] = 0;
- DisablePlayerCheckpoint(i);
- }
- }
- }
- }
- if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
- {
- if(IsPlayerConnected(TransportDriver[playerid]))
- {
- TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
- TransportTime[TransportDriver[playerid]] = 0;
- TransportCost[TransportDriver[playerid]] = 0;
- format(gstring, sizeof(gstring), "~w~Passageiro saiu~n~~g~ganhou R$%d",TransportCost[playerid]);
- GameTextForPlayer(TransportDriver[playerid], gstring, 5000, 1);
- }
- }
- if(GotHit[playerid] > 0)
- {
- if(GetChased[playerid] < 999)
- {
- if(IsPlayerConnected(GetChased[playerid]))
- {
- SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Seu contrato saiu do servidor.");
- GotHit[GetChased[playerid]] = 0;//Marcos Fez!!
- GoChase[GetChased[playerid]] = 999;
- }
- }
- }
- if(PlayerAirsofting[playerid] != 0)
- {
- AirsoftPlayers --;
- }
- if(HireCar[playerid] != 299)
- {
- gLastDriver[HireCar[playerid]] = 300;
- VTrancado[HireCar[playerid]] = 0;
- UnLockCar(HireCar[playerid]);
- }
- if (gLastCar[playerid] > 0)
- {
- gLastDriver[gLastCar[playerid]] = 300;
- if(PlayerInfo[playerid][pPHousekey] != gLastCar[playerid]-1)
- {
- VTrancado[gLastCar[playerid]] = 0;
- UnLockCar(gLastCar[playerid]);
- }
- }
- if(PlayerBoxing[playerid] > 0)
- {
- if(Boxer1 == playerid)
- {
- if(IsPlayerConnected(Boxer2))
- {
- PlayerBoxing[Boxer2] = 0;
- SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
- SetPlayerInterior(Boxer2, 5);
- GameTextForPlayer(Boxer2, "~r~Luta interrompida", 5000, 1);
- }
- }
- else if(Boxer2 == playerid)
- {
- if(IsPlayerConnected(Boxer1))
- {
- PlayerBoxing[Boxer1] = 0;
- SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
- SetPlayerInterior(Boxer1, 5);
- GameTextForPlayer(Boxer1, "~r~Luta interrompida", 5000, 1);
- }
- }
- InRing = 0;
- RorndStarted = 0;
- Boxer1 = 9999;
- Boxer2 = 9999;
- TBoxer = 9999;
- }
- if(TransportDuty[playerid] == 1)
- {
- TaxiDrivers -= 1;
- }
- else if(TransportDuty[playerid] == 2)
- {
- BusDrivers -= 1;
- }
- if(IsACop(playerid))
- {
- if(EmRondaCop[playerid] == 1) { Copsronda -= 1; }
- }
- if(PlayerInfo[playerid][pMembro] == 4 || PlayerInfo[playerid][pLider] == 4)
- {
- if(EmpregoDuty[playerid] == 1) { Medics -= 1; }
- }
- else if(IsAMec(playerid))
- {
- if(EmpregoDuty[playerid] == 1) { Mechanics -= 1; }
- }
- if(PlayerInfo[playerid][pEmprego] == 2) { Advogado -= 1; }
- BusrouteEast[playerid][0] = 0;
- BusrouteWest[playerid][0] = 0;
- Delete3DTextLabel(ProcuradoP[playerid]);
- SetTimer("ContarJogadores", 3000, 0);
- DeuVDP[playerid] = 0;
- gPlayerLogged[playerid] = 0;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement