Advertisement
Guest User

Ta AE

a guest
Apr 7th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.42 KB | None | 0 0
  1. if(strcmp(cmd, "/daradmin", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. if(PlayerInfo[playerid][pAdmin] < 0 && ServerOwner[playerid] != 1)
  6. {
  7. SendClientMessage(playerid, COLOR_GRAD1, "Você não tem autorização para usar esse comando.");
  8. return 1;
  9. }
  10. tmp = strtok(cmdtext, idx);
  11. if(!strlen(tmp))
  12. {
  13. SendClientMessage(playerid, COLOR_GRAD2, "[INFO] Use: /daradmin [id] [Nivel]");
  14. return 1;
  15. }
  16. new para1;
  17. new level;
  18. para1 = ReturnUser(tmp);
  19. tmp = strtok(cmdtext, idx);
  20. if(!strlen(tmp))
  21. {
  22. SendClientMessage(playerid, COLOR_GRAD2, "[INFO] Use: /daradmin [id] [Nivel]");
  23. return 1;
  24. }
  25. level = strval(tmp);
  26. GetPlayerName(para1, giveplayer, sizeof(giveplayer));
  27. GetPlayerName(playerid, sendername, sizeof(sendername));
  28. format(string, sizeof(string), "{FFFFFF}Você foi promovido para level {0FFFFF}%d{FFFFFF} de Administrador - Por {0FFFFF}%s", level, sendername);
  29. SendClientMessage(para1, COLOR_LIGHTBLUE, string);
  30. format(string, sizeof(string), "{FFFFFF}Você promoveu o(a) {0FFFFF}%s{FFFFFF} Para o level {0FFFFF}%d{FFFFFF} de Administrador.", giveplayer,level);
  31. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  32. if(IsPlayerConnected(para1))
  33.  
  34.  
  35. // OnPlayerDisconnect
  36. EmTutorial[playerid] = 0;
  37. if( tirohitman[ playerid ] ^ 9999 && reason ^ 2 ){
  38. new string[ 128 ];
  39. tirohitman[ playerid ] = 9999;
  40. tirotime[ playerid ] = 0;
  41. PlayerInfo[ playerid ][ pJailed ] = 2;
  42. PlayerInfo[ playerid ][ pJailTime ] = 50 * 60;
  43. format( string, sizeof string, "O player %s foi preso automaticamente por 50 minutos. Motivo: Anti-RPG.", PlayerName( playerid ) );
  44. SendClientMessageToAll( COLOR_LIGHTRED, string );
  45. }
  46. if(DeuVDP[playerid] == 1)
  47. {
  48. new string[ 128 ];
  49. DeuVDP[playerid] = 0;
  50. PlayerInfo[ playerid ][ pJailed ] = 2;
  51. PlayerInfo[ playerid ][ pJailTime ] = 50 * 60;
  52. format( string, sizeof string, "O player %s foi preso automaticamente por 50 minutos. Motivo: Anti-RPG.", PlayerName( playerid ) );
  53. SendClientMessageToAll( COLOR_LIGHTRED, string );
  54. }
  55. DeletePVar(playerid, "PlayerMorto");
  56. PlayerInfo[playerid][pOnline] = 0;
  57. SalvarPlayer(playerid);
  58. new caller = Mobile[playerid];
  59. new nome[24], str[50];
  60. GetPlayerName(playerid, nome, 24);
  61. format(str, sizeof str, "%s - Arara", nome);
  62. dini_BoolSet("Araras.ini", str, Infoa[playerid][Arara]);
  63. format(str, sizeof str, "%s - Racao", nome);
  64. dini_BoolSet("Araras.ini", str, Infoa[playerid][Racao]);
  65. format(str, sizeof str, "%s - Grande", nome);
  66. dini_IntSet("Araras.ini", str, Infoa[playerid][Grande]);
  67. casaid[playerid] = 9999;
  68. PlayerInBank[ playerid ] = false;
  69. PegarAtividade( playerid );
  70. KillTimer(tima[playerid]);
  71. TextDrawHideForPlayer(playerid,____[playerid]);
  72. TextDrawDestroy(____[playerid]);
  73. for( new i; i < MAX_PLAYERS; i ++ ){
  74. if( IsPlayerConnected( i ) ) {
  75. if( Espiando[ i ] == playerid ){
  76. if( PlayerInfo[ i ][ pAdmin ] > 0 ){
  77. PlayerInfo[ i ][ pTeam ] = 0;
  78. TogglePlayerSpectating( i, false );
  79. SpawnPlayer( i );
  80. SendClientMessage( i, -1, "O player deslogou." );
  81. Espiando[ i ] = -1;
  82. }
  83. }
  84. }
  85. }
  86.  
  87. Espiando[ playerid ] = -1;
  88. if(caller != 9999)
  89. {
  90. if(caller < 255)
  91. {
  92. SendClientMessage(caller, COLOR_GRAD2, "A ligação caiu...");
  93. CellTime[caller] = 0;
  94. CellTime[playerid] = 0;
  95. Mobile[caller] = 9999;
  96. }
  97. Mobile[playerid] = 9999;
  98. CellTime[playerid] = 0;
  99. }
  100. if(HireCar[playerid] > 0)
  101. {
  102. VTrancado[HireCar[playerid]] = 0;
  103. UnLockCar(HireCar[playerid]);
  104. SetVehicleToRespawn(HireCar[playerid]);
  105. HireCar[playerid] = 0;
  106. }
  107. if (PlayerInfo[playerid][pBarraca] != 0)
  108. {
  109. RemoveBarraca(playerid);
  110. }
  111. if (PlayerInfo[playerid][pParedao] != 0)
  112. {
  113. RemoveParedao(playerid);
  114. }
  115. if(pRoadblock[playerid] != 0)
  116. {
  117. RemoveRoadblock(playerid);
  118. }
  119. if(SpikeInfo[playerid][sCreated] != 0)
  120. {
  121. RemoveRoadPregos(playerid);
  122. }
  123. if(pRoadBloq[playerid] != 0)
  124. {
  125. RemoveRoadBloq(playerid);
  126. }
  127. if(PlayerInfo[playerid][pCone] != 0)
  128. {
  129. RemoveCone(playerid);
  130. }
  131. if(pRoadRampa[playerid][1] != 0) RemovePlataforma(playerid);
  132. /*if(PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pAdmin] != 3000)
  133. {
  134. format(gstring, sizeof(gstring), "~p~%s: ~r~~h~OFF", PlayerName(playerid));
  135. for(new i=0; i<MaiorID; i++)
  136. {
  137. if(IsPlayerConnected(i))
  138. {
  139. GameTextForPlayer(i, gstring , 1000, 1);
  140. }
  141. }
  142. }*/
  143. if(InfoWiiu[playerid][NumSenha] != 999)
  144. {
  145. InfoWiiu[playerid][NumSenha] = 999;
  146. strmid(InfoWiiu[playerid][PergSenha], "Vazia", 0, strlen("Vazia"), 255);
  147. SenhasAtendimento --;
  148. }
  149. switch(reason)
  150. {
  151. case 0: format(gstring, sizeof(gstring), "***%s saiu do servidor por erro de conexão ou crash.", PlayerName(playerid));
  152. case 1: format(gstring, sizeof(gstring), "***%s saiu do servidor por vontade propria.", PlayerName(playerid));
  153. case 2: format(gstring, sizeof(gstring), "***%s Saiu do servidor kickado ou banido.", PlayerName(playerid));
  154. }
  155. ProxDetector(100.0, playerid, gstring,0xFFBB77AA,0xFFBB77AA,0xFFBB77AA,0xFFBB77AA,0xFFBB77AA);
  156. gActivePlayers[playerid]--;
  157. if(MudarNickAceito[playerid] == 1)
  158. {
  159. MudarNickAceito[playerid] = 0;
  160. }
  161. if(ProvocoCasarao[playerid] == 1)
  162. {
  163. GangZoneStopFlashForAll(GZCasarao);
  164. GangZoneShowForAll(GZCasarao, 0xFFCCFF96);
  165. GuerranoCasarao = 0;
  166. ProvocoCasarao[playerid] = 0;
  167. donocasarao = 0;
  168. Dominando[playerid] = 0;
  169. KillTimer(TempoGuerraCasarao);
  170. }
  171. if(ProvocoEstacao[playerid] == 1)
  172. {
  173. GangZoneStopFlashForAll(GZEstacao);
  174. GangZoneShowForAll(GZEstacao, 0xFFCCFF96);
  175. GuerranaEstacao = 0;
  176. ProvocoEstacao[playerid] = 0;
  177. donoestacao = 0;
  178. Dominando[playerid] = 0;
  179. KillTimer(TempoGuerraEstacao);
  180. }
  181. if(ProvocoCemiterio[playerid] == 1)
  182. {
  183. GangZoneStopFlashForAll(GZCemiterio);
  184. GangZoneShowForAll(GZCemiterio, 0xFFCCFF96);
  185. GuerranoCemiterio = 0;
  186. ProvocoCemiterio[playerid] = 0;
  187. donoCemiterio = 0;
  188. Dominando[playerid] = 0;
  189. KillTimer(TempoGuerraCemiterio);
  190. }
  191. if(ProvocoShop[playerid] == 1)
  192. {
  193. GangZoneStopFlashForAll(GZShop);
  194. GangZoneShowForAll(GZShop, 0xFFCCFF96);
  195. GuerranoShop = 0;
  196. ProvocoShop[playerid] = 0;
  197. donoShop = 0;
  198. Dominando[playerid] = 0;
  199. KillTimer(TempoGuerraShop);
  200. }
  201. if(Provococonst[playerid] == 1)
  202. {
  203. GangZoneStopFlashForAll(GZconst);
  204. GangZoneShowForAll(GZconst, 0xFFCCFF96);
  205. Guerranoconst = 0;
  206. Provococonst[playerid] = 0;
  207. donoconst = 0;
  208. Dominando[playerid] = 0;
  209. KillTimer(TempoGuerraconst);
  210. }
  211. if(ProvocoPark[playerid] == 1)
  212. {
  213. GangZoneStopFlashForAll(GZPark);
  214. GangZoneShowForAll(GZPark, 0xFFCCFF96);
  215. GuerranoPark = 0;
  216. ProvocoPark[playerid] = 0;
  217. donoPark = 0;
  218. Dominando[playerid] = 0;
  219. KillTimer(TempoGuerraPark);
  220. }
  221. if(ProvocoSkate[playerid] == 1)
  222. {
  223. GangZoneStopFlashForAll(GZSkate);
  224. GangZoneShowForAll(GZSkate, 0xFFCCFF96);
  225. GuerranoSkate = 0;
  226. ProvocoSkate[playerid] = 0;
  227. donoskate = 0;
  228. Dominando[playerid] = 0;
  229. KillTimer(TempoGuerraSkate);
  230. }
  231. for(new i = 0; i < MaiorID; i++)
  232. {
  233. if(IsPlayerConnected(i))
  234. {
  235. if(TaxiAccepted[i] < 999)
  236. {
  237. if(TaxiAccepted[i] == playerid)
  238. {
  239. TaxiAccepted[i] = 999;
  240. GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
  241. TaxiCallTime[i] = 0;
  242. DisablePlayerCheckpoint(i);
  243. }
  244. }
  245. else if(LocalizarTime[i] < 999)
  246. {
  247. if(LocalizarAccepted[i] == playerid)
  248. {
  249. LocalizarTime[i] = 999;
  250. GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
  251. //TaxiCallTime[i] = 0;
  252. DisablePlayerCheckpoint(i);
  253. }
  254. }
  255. else if(CopsrondaAccepted[i] < 999)
  256. {
  257. if(CopsrondaAccepted[i] == playerid)
  258. {
  259. CopsrondaAccepted[i] = 999;
  260. GameTextForPlayer(i, "~w~Policial o player~n~~r~Deixou o jogo", 5000, 1);
  261. CopsrondaCallTime[i] = 0;
  262. DisablePlayerCheckpoint(i);
  263. }
  264. }
  265. else if(MedicAccepted[i] < 999)
  266. {
  267. if(MedicAccepted[i] == playerid)
  268. {
  269. MedicAccepted[i] = 999;
  270. GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
  271. MedicCallTime[i] = 0;
  272. DisablePlayerCheckpoint(i);
  273. }
  274. }
  275. else if(MechanicAccepted[i] < 999)
  276. {
  277. if(MechanicAccepted[i] == playerid)
  278. {
  279. MechanicAccepted[i] = 999;
  280. GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
  281. MechanicCallTime[i] = 0;
  282. DisablePlayerCheckpoint(i);
  283. }
  284. }
  285. else if(BusAccepted[i] < 999)
  286. {
  287. if(BusAccepted[i] == playerid)
  288. {
  289. BusAccepted[i] = 999;
  290. GameTextForPlayer(i, "~w~O Cliente~n~~r~Saiu do jogo", 5000, 1);
  291. BusCallTime[i] = 0;
  292. DisablePlayerCheckpoint(i);
  293. }
  294. }
  295. }
  296. }
  297. if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
  298. {
  299. if(IsPlayerConnected(TransportDriver[playerid]))
  300. {
  301. TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
  302. TransportTime[TransportDriver[playerid]] = 0;
  303. TransportCost[TransportDriver[playerid]] = 0;
  304. format(gstring, sizeof(gstring), "~w~Passageiro saiu~n~~g~ganhou R$%d",TransportCost[playerid]);
  305. GameTextForPlayer(TransportDriver[playerid], gstring, 5000, 1);
  306. }
  307. }
  308. if(GotHit[playerid] > 0)
  309. {
  310. if(GetChased[playerid] < 999)
  311. {
  312. if(IsPlayerConnected(GetChased[playerid]))
  313. {
  314. SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Seu contrato saiu do servidor.");
  315. GotHit[GetChased[playerid]] = 0;//Marcos Fez!!
  316. GoChase[GetChased[playerid]] = 999;
  317. }
  318. }
  319. }
  320. if(PlayerAirsofting[playerid] != 0)
  321. {
  322. AirsoftPlayers --;
  323. }
  324. if(HireCar[playerid] != 299)
  325. {
  326. gLastDriver[HireCar[playerid]] = 300;
  327. VTrancado[HireCar[playerid]] = 0;
  328. UnLockCar(HireCar[playerid]);
  329. }
  330. if (gLastCar[playerid] > 0)
  331. {
  332. gLastDriver[gLastCar[playerid]] = 300;
  333. if(PlayerInfo[playerid][pPHousekey] != gLastCar[playerid]-1)
  334. {
  335. VTrancado[gLastCar[playerid]] = 0;
  336. UnLockCar(gLastCar[playerid]);
  337. }
  338. }
  339. if(PlayerBoxing[playerid] > 0)
  340. {
  341. if(Boxer1 == playerid)
  342. {
  343. if(IsPlayerConnected(Boxer2))
  344. {
  345. PlayerBoxing[Boxer2] = 0;
  346. SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
  347. SetPlayerInterior(Boxer2, 5);
  348. GameTextForPlayer(Boxer2, "~r~Luta interrompida", 5000, 1);
  349. }
  350. }
  351. else if(Boxer2 == playerid)
  352. {
  353. if(IsPlayerConnected(Boxer1))
  354. {
  355. PlayerBoxing[Boxer1] = 0;
  356. SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
  357. SetPlayerInterior(Boxer1, 5);
  358. GameTextForPlayer(Boxer1, "~r~Luta interrompida", 5000, 1);
  359. }
  360. }
  361. InRing = 0;
  362. RorndStarted = 0;
  363. Boxer1 = 9999;
  364. Boxer2 = 9999;
  365. TBoxer = 9999;
  366. }
  367. if(TransportDuty[playerid] == 1)
  368. {
  369. TaxiDrivers -= 1;
  370. }
  371. else if(TransportDuty[playerid] == 2)
  372. {
  373. BusDrivers -= 1;
  374. }
  375. if(IsACop(playerid))
  376. {
  377. if(EmRondaCop[playerid] == 1) { Copsronda -= 1; }
  378. }
  379. if(PlayerInfo[playerid][pMembro] == 4 || PlayerInfo[playerid][pLider] == 4)
  380. {
  381. if(EmpregoDuty[playerid] == 1) { Medics -= 1; }
  382. }
  383. else if(IsAMec(playerid))
  384. {
  385. if(EmpregoDuty[playerid] == 1) { Mechanics -= 1; }
  386. }
  387. if(PlayerInfo[playerid][pEmprego] == 2) { Advogado -= 1; }
  388. BusrouteEast[playerid][0] = 0;
  389. BusrouteWest[playerid][0] = 0;
  390. Delete3DTextLabel(ProcuradoP[playerid]);
  391. SetTimer("ContarJogadores", 3000, 0);
  392. DeuVDP[playerid] = 0;
  393. gPlayerLogged[playerid] = 0;
  394. return 1;
  395. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement