Advertisement
Guest User

By_MauricioMoraes

a guest
Jun 15th, 2013
576
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 69.97 KB | None | 0 0
  1. /*------------------------------------------------------------------------------
  2. By Maurício Moraes
  3. ------------------------------------------------------------------------------*/
  4. #include a_samp
  5. #include DOF2
  6. #include zcmd
  7. #include sscanf2
  8.  
  9. #define DestinoDasContas "Contas/%s.ini"
  10. #define DestinoDasPersonagens "Personagens/%s.ini"
  11.  
  12. #define CallBack::%0(%1) forward %0(%1); public %0(%1)
  13.  
  14. enum
  15. {
  16. DIALOG_REGISTRO,
  17. DIALOG_LOGIN,
  18. CREATACCOUNT,
  19. CREATACCOUNT1,
  20. CREATACCOUNT2,
  21. CREATACCOUNT3,
  22. CREATSEXO
  23. }
  24.  
  25. enum TXD
  26. {
  27. Text:CHARGE_ACCOUNT,
  28. PlayerText:information[8],
  29. PlayerText:TextTito[7]
  30. }
  31. static TextDrawInt[MAX_PLAYERS][TXD];
  32.  
  33. enum Per
  34. {
  35. Personagens[4],
  36. pAdmin
  37. }
  38. static CharInfo[MAX_PLAYERS][Per];
  39.  
  40. enum pInfo
  41. {
  42. Money,
  43. Level,
  44. Skin,
  45. Sexo,
  46. Float:x,
  47. Float:y,
  48. Float:z,
  49. Float:Angle
  50. }
  51. static PlayerInfo[MAX_PLAYERS][pInfo];
  52.  
  53. static bool:logged[MAX_PLAYERS] = {false, ...}, ClicadoEm[MAX_PLAYERS],
  54. bool:loggedAduty[MAX_PLAYERS] = {false, ...};
  55.  
  56. main()
  57. {
  58. print(" By Maurício Moraes");
  59. }
  60.  
  61. public OnGameModeInit()
  62. {
  63. return 1;
  64. }
  65.  
  66. public OnGameModeExit()
  67. {
  68. static i;
  69. for(i = GetMaxPlayers()-1; i > -1; --i)
  70. {
  71. if(IsPlayerConnected(i))
  72. {
  73. SaveFiles(i);
  74. }
  75. }
  76. DOF2_Exit();
  77. return 1;
  78. }
  79.  
  80. public OnPlayerRequestClass(playerid, classid)
  81. {
  82. return 1;
  83. }
  84.  
  85. public OnPlayerConnect(playerid)
  86. {
  87. loggedAduty[playerid] = false;
  88. CarChars(playerid);
  89.  
  90. TextDrawInt[playerid][CHARGE_ACCOUNT] = TextDrawCreate(180.000000, 340.000000, "__carregando dados da conta ...");
  91. TextDrawBackgroundColor(TextDrawInt[playerid][CHARGE_ACCOUNT], 255);
  92. TextDrawFont(TextDrawInt[playerid][CHARGE_ACCOUNT], 1);
  93. TextDrawLetterSize(TextDrawInt[playerid][CHARGE_ACCOUNT], 0.509999, 1.900000);
  94. TextDrawColor(TextDrawInt[playerid][CHARGE_ACCOUNT], -1);
  95. TextDrawSetOutline(TextDrawInt[playerid][CHARGE_ACCOUNT], 0);
  96. TextDrawSetProportional(TextDrawInt[playerid][CHARGE_ACCOUNT], 1);
  97. TextDrawSetShadow(TextDrawInt[playerid][CHARGE_ACCOUNT], 1);
  98. TextDrawUseBox(TextDrawInt[playerid][CHARGE_ACCOUNT], 1);
  99. TextDrawBoxColor(TextDrawInt[playerid][CHARGE_ACCOUNT], 0x00000066);
  100. TextDrawTextSize(TextDrawInt[playerid][CHARGE_ACCOUNT], 462.000000, 0.000000);
  101.  
  102. TextDrawShowForPlayer(playerid, TextDrawInt[playerid][CHARGE_ACCOUNT]);
  103. SetTimerEx("ChargeAccount", 5000, false, "i", playerid);
  104.  
  105. SetPlayerColor(playerid, -1);
  106. SetPlayerCameraPos(playerid, 1691.0731, -1470.4502, 100.1112);
  107. SetPlayerCameraLookAt(playerid, 1691.9696, -1469.9993, 99.7611);
  108. SetPlayerVirtualWorld(playerid, 3);
  109. return 1;
  110. }
  111.  
  112. CallBack::ChargeAccount(playerid)
  113. {
  114. TextDrawHideForPlayer(playerid, TextDrawInt[playerid][CHARGE_ACCOUNT]);
  115. static _var[100];
  116. format(_var, sizeof(_var), DestinoDasContas, PlayerName(playerid) ) ;
  117. if(DOF2_FileExists(_var))
  118. {
  119. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Paraná RP", "Você ja possue um registro no paraná rp \n Por favor bote sua senha para poder logar com segurança !", "Logar", "Cancelar");
  120. }
  121. else
  122. {
  123. ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "Paraná RP", "Seja Bem vindo \n Você não possue uma conta em nosso banco de dados .\n Por favor bote uma senha segura para se registrar !", "Registrar", "Cancelar");
  124. }
  125. return 1;
  126. }
  127.  
  128. public OnPlayerDisconnect(playerid, reason)
  129. {
  130. SaveFiles(playerid);
  131. return 1;
  132. }
  133.  
  134. public OnPlayerSpawn(playerid)
  135. {
  136. return 1;
  137. }
  138.  
  139. public OnPlayerDeath(playerid, killerid, reason)
  140. {
  141. return 1;
  142. }
  143.  
  144. public OnVehicleSpawn(vehicleid)
  145. {
  146. return 1;
  147. }
  148.  
  149. public OnVehicleDeath(vehicleid, killerid)
  150. {
  151. return 1;
  152. }
  153.  
  154. public OnPlayerText(playerid, text[])
  155. {
  156. if(logged[playerid] == false)return 0;
  157. if ( loggedAduty[playerid] == true )
  158. {
  159. static _var[300];
  160. format(_var,sizeof(_var),"%s{FFFFFF}: %s", Name(playerid), text);
  161. ProxDetector(5.0, playerid, _var,0xFF0080FF,0xFF0080FF,0xFF0080FF,0xFF0080FF,0xFF0080FF);
  162. }
  163. else
  164. {
  165. static _var[300];
  166. format(_var,sizeof(_var),"%s: %s", Name(playerid), text);
  167. ProxDetector(5.0, playerid, _var,0xC0C0C0FF,0xC0C0C0FF,0xC0C0C0FF,0xC0C0C0FF,0xC0C0C0FF);
  168. }
  169. return 0;
  170. }
  171.  
  172. public OnPlayerCommandText(playerid, cmdtext[])
  173. {
  174. return 0;
  175. }
  176.  
  177. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  178. {
  179. return 1;
  180. }
  181.  
  182. public OnPlayerExitVehicle(playerid, vehicleid)
  183. {
  184. return 1;
  185. }
  186.  
  187. public OnPlayerStateChange(playerid, newstate, oldstate)
  188. {
  189. return 1;
  190. }
  191.  
  192. public OnPlayerEnterCheckpoint(playerid)
  193. {
  194. return 1;
  195. }
  196.  
  197. public OnPlayerLeaveCheckpoint(playerid)
  198. {
  199. return 1;
  200. }
  201.  
  202. public OnPlayerEnterRaceCheckpoint(playerid)
  203. {
  204. return 1;
  205. }
  206.  
  207. public OnPlayerLeaveRaceCheckpoint(playerid)
  208. {
  209. return 1;
  210. }
  211.  
  212. public OnRconCommand(cmd[])
  213. {
  214. return 1;
  215. }
  216.  
  217. public OnPlayerRequestSpawn(playerid)
  218. {
  219. if(logged[playerid] == false)
  220. {
  221. return 0;
  222. }
  223. return 1;
  224. }
  225.  
  226. public OnObjectMoved(objectid)
  227. {
  228. return 1;
  229. }
  230.  
  231. public OnPlayerObjectMoved(playerid, objectid)
  232. {
  233. return 1;
  234. }
  235.  
  236. public OnPlayerPickUpPickup(playerid, pickupid)
  237. {
  238. return 1;
  239. }
  240.  
  241. public OnVehicleMod(playerid, vehicleid, componentid)
  242. {
  243. return 1;
  244. }
  245.  
  246. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  247. {
  248. return 1;
  249. }
  250.  
  251. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  252. {
  253. return 1;
  254. }
  255.  
  256. public OnPlayerSelectedMenuRow(playerid, row)
  257. {
  258. return 1;
  259. }
  260.  
  261. public OnPlayerExitedMenu(playerid)
  262. {
  263. return 1;
  264. }
  265.  
  266. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  267. {
  268. return 1;
  269. }
  270.  
  271. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  272. {
  273. if(newkeys == KEY_SUBMISSION)
  274. {
  275. SelectTextDraw(playerid, 0xFFFFFFFF);
  276. }
  277. return 1;
  278. }
  279.  
  280. public OnRconLoginAttempt(ip[], password[], success)
  281. {
  282. return 1;
  283. }
  284.  
  285. public OnPlayerUpdate(playerid)
  286. {
  287. return 1;
  288. }
  289.  
  290. public OnPlayerStreamIn(playerid, forplayerid)
  291. {
  292. return 1;
  293. }
  294.  
  295. public OnPlayerStreamOut(playerid, forplayerid)
  296. {
  297. return 1;
  298. }
  299.  
  300. public OnVehicleStreamIn(vehicleid, forplayerid)
  301. {
  302. return 1;
  303. }
  304.  
  305. public OnVehicleStreamOut(vehicleid, forplayerid)
  306. {
  307. return 1;
  308. }
  309.  
  310. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  311. {
  312. if(dialogid == DIALOG_REGISTRO)
  313. {
  314. if(response)
  315. {
  316. static _var[75];
  317. format(_var, sizeof(_var), DestinoDasContas, PlayerName(playerid));
  318. DOF2_CreateFile(_var);
  319. DOF2_SetString(_var, "Senha", inputtext);
  320. DOF2_SetString(_var, "Personagem1", "Nao Existente");
  321. DOF2_SetString(_var, "Personagem2", "Nao Existente");
  322. DOF2_SetString(_var, "Personagem3", "Nao Existente");
  323. DOF2_SetString(_var, "Personagem4", "Nao Existente");
  324. DOF2_SetInt(_var, "Admininistrador", 0);
  325. DOF2_SaveFile();
  326. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Paraná RP/G", "Você ja possue um registro no paraná rpg \n Por favor bote sua senha para poder logar com segurança !", "Logar", "Cancelar");
  327. }
  328. else
  329. {
  330. SendClientMessage(playerid, 0xFF2222FF, " Você foi kickado por não querer se registrar !");
  331. Kick(playerid);
  332. }
  333. }
  334. if(dialogid == DIALOG_LOGIN)
  335. {
  336. if(response)
  337. {
  338. static str[100];
  339. format(str, sizeof(str), DestinoDasContas, PlayerName(playerid));
  340. if ( !strcmp ( inputtext , DOF2_GetString(str,"Senha") , false ))
  341. {
  342. CreatText(playerid);
  343. for(new i = 0; i <15; i ++)
  344. SendClientMessage(playerid, -1, " ");
  345. InfoPlayerLogin(playerid);
  346. RecorLogin(playerid);
  347. if(CharInfo[playerid][pAdmin] > 0)
  348. {
  349. SendClientMessage(playerid, -1,"{9F9FFF}admin{FFFFFF}: Para você entrar no aduty , digite {C0C0C0}/aduty");
  350. }
  351. return 1;
  352. }
  353. else
  354. {
  355. SendClientMessage(playerid,0xFF2222FF ," Senha Incorreta , forneça a senha correta por favor!");
  356. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Paraná RP/G", "Você ja possue um registro no paraná rpg \n Por favor bote sua senha para poder logar com segurança !", "Logar", "Cancelar");
  357. }
  358. }
  359. }
  360. if(dialogid == CREATACCOUNT)
  361. {
  362. if(!response) return 1;
  363. static _var[100], str[100], tito[100];
  364. format(tito, sizeof(tito), DestinoDasPersonagens, inputtext);
  365. if(DOF2_FileExists(tito))
  366. {
  367. ShowPlayerDialog(playerid, CREATACCOUNT, DIALOG_STYLE_INPUT, "Creat Account", " Olá senhor !\n Informe seu nome para efetuar a criação de seu char !\n Nome já usado !", "Criar", "Cancelar");
  368. return 1;
  369. }
  370. format(_var, sizeof(_var), DestinoDasContas, PlayerName(playerid));
  371. DOF2_SetString(_var, "Personagem1", inputtext);
  372. DOF2_SaveFile();
  373. format(str, sizeof(str), DestinoDasPersonagens, DOF2_GetString(_var, "Personagem1"));
  374. TitoCreatAccount(playerid, DOF2_GetString(_var, "Personagem1"));
  375. RecorLogin(playerid);
  376. ShowPlayerDialog(playerid, CREATSEXO, DIALOG_STYLE_MSGBOX, "Sexo", " Qual seu sexo ??", "Homem", "Mulher");
  377. return 1;
  378. }
  379. if(dialogid == CREATACCOUNT1)
  380. {
  381. if(!response) return 1;
  382. static _var[100], str[100], tito[100];
  383. format(tito, sizeof(tito), DestinoDasPersonagens, inputtext);
  384. if(DOF2_FileExists(tito))
  385. {
  386. ShowPlayerDialog(playerid, CREATACCOUNT1, DIALOG_STYLE_INPUT, "Creat Account", " Olá senhor !\n Informe seu nome para efetuar a criação de seu char !\n Nome já usado !", "Criar", "Cancelar");
  387. return 1;
  388. }
  389. format(_var, sizeof(_var), DestinoDasContas, PlayerName(playerid));
  390. DOF2_SetString(_var, "Personagem2", inputtext);
  391. DOF2_SaveFile();
  392. format(str, sizeof(str), DestinoDasPersonagens, DOF2_GetString(_var, "Personagem2"));
  393. TitoCreatAccount(playerid, DOF2_GetString(_var, "Personagem2"));
  394. RecorLogin(playerid);
  395. ShowPlayerDialog(playerid, CREATSEXO, DIALOG_STYLE_MSGBOX, "Sexo", " Qual seu sexo ??", "Homem", "Mulher");
  396. return 1;
  397. }
  398. if(dialogid == CREATACCOUNT2)
  399. {
  400. if(!response) return 1;
  401. static _var[100], str[100], tito[100];
  402. format(tito, sizeof(tito), DestinoDasPersonagens, inputtext);
  403. if(DOF2_FileExists(tito))
  404. {
  405. ShowPlayerDialog(playerid, CREATACCOUNT2, DIALOG_STYLE_INPUT, "Creat Account", " Olá senhor !\n Informe seu nome para efetuar a criação de seu char !\n Nome já usado !", "Criar", "Cancelar");
  406. return 1;
  407. }
  408. format(_var, sizeof(_var), DestinoDasContas, PlayerName(playerid));
  409. DOF2_SetString(_var, "Personagem3", inputtext);
  410. DOF2_SaveFile();
  411. format(str, sizeof(str), DestinoDasPersonagens, DOF2_GetString(_var, "Personagem3"));
  412. TitoCreatAccount(playerid, DOF2_GetString(_var, "Personagem3"));
  413. RecorLogin(playerid);
  414. ShowPlayerDialog(playerid, CREATSEXO, DIALOG_STYLE_MSGBOX, "Sexo", " Qual seu sexo ??", "Homem", "Mulher");
  415. return 1;
  416. }
  417. if(dialogid == CREATACCOUNT3)
  418. {
  419. if(!response) return 1;
  420. static _var[100], str[100], tito[100];
  421. format(tito, sizeof(tito), DestinoDasPersonagens, inputtext);
  422. if(DOF2_FileExists(tito))
  423. {
  424. ShowPlayerDialog(playerid, CREATACCOUNT3, DIALOG_STYLE_INPUT, "Creat Account", " Olá senhor !\n Informe seu nome para efetuar a criação de seu char !\n Nome já usado ", "Criar", "Cancelar");
  425. return 1;
  426. }
  427. format(_var, sizeof(_var), DestinoDasContas, PlayerName(playerid));
  428. DOF2_SetString(_var, "Personagem4", inputtext);
  429. DOF2_SaveFile();
  430.  
  431. format(str, sizeof(str), DestinoDasPersonagens, DOF2_GetString(_var, "Personagem4"));
  432. TitoCreatAccount(playerid, DOF2_GetString(_var, "Personagem4"));
  433. RecorLogin(playerid);
  434. ShowPlayerDialog(playerid, CREATSEXO, DIALOG_STYLE_MSGBOX, "Sexo", " Qual seu sexo ??", "Homem", "Mulher");
  435. return 1;
  436. }
  437. if(dialogid == CREATSEXO)
  438. {
  439. if(response)
  440. {
  441. static tito[100];
  442. format(tito, sizeof(tito), DestinoDasPersonagens, Name(playerid));
  443. DOF2_SetInt ( tito , "Sexo" , 1 );
  444. DOF2_SaveFile();
  445. } else {
  446. static tito[100];
  447. format(tito, sizeof(tito), DestinoDasPersonagens, Name(playerid));
  448. DOF2_SetInt(tito,"Sexo", 2);
  449. DOF2_SetInt(tito,"Skin",56);
  450. DOF2_SaveFile();
  451. }
  452. }
  453. return 1;
  454. }
  455.  
  456. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  457. {
  458. return 1;
  459. }
  460.  
  461. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  462. {
  463. static _var[200], _str[150];
  464. format(_var, sizeof(_var), DestinoDasContas, PlayerName(playerid));
  465.  
  466. if(playertextid == TextDrawInt[playerid][information][1])
  467. {
  468. ClicadoEm[playerid] = 1;
  469. format(_str,sizeof(_str), "~r~%s", DOF2_GetString(_var, "Personagem1"));
  470. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][1],_str);
  471. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][1]);
  472.  
  473. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem2"));
  474. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][2],_str);
  475. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][2]);
  476.  
  477. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem3"));
  478. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][3],_str);
  479. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][3]);
  480.  
  481. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem4"));
  482. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][4],_str);
  483. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][4]);
  484.  
  485. static tito[100];
  486. format(tito,sizeof(tito), DestinoDasPersonagens,DOF2_GetString(_var, "Personagem1"));
  487. SetPlayerSkin(playerid, DOF2::GetInt(tito,"Skin"));
  488.  
  489. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][0]);
  490. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][1]);
  491.  
  492. static kk[50];
  493. format(kk,sizeof(kk), "%s", DOF2_GetString(_var, "Personagem1"));
  494. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][TextTito][2],kk);
  495. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][2]);
  496.  
  497.  
  498. static ss[50];
  499. format(ss,sizeof(ss), "~g~$%d", DOF2_GetInt(tito, "Money"));
  500. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][TextTito][4],ss);
  501. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][4]);
  502.  
  503. static ses[50];
  504. if(DOF2_GetInt(tito,"Sexo") == 1) format(ses,sizeof(ses), "~y~Homem");
  505. if(DOF2_GetInt(tito,"Sexo") == 2) format(ses,sizeof(ses), "~y~Mulher");
  506. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][TextTito][3],ses);
  507. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][3]);
  508.  
  509. }
  510. if(playertextid == TextDrawInt[playerid][information][2])
  511. {
  512. ClicadoEm[playerid] = 2;
  513. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem1"));
  514. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][1],_str);
  515. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][1]);
  516.  
  517. format(_str,sizeof(_str), "~r~%s", DOF2_GetString(_var, "Personagem2"));
  518. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][2],_str);
  519. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][2]);
  520.  
  521. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem3"));
  522. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][3],_str);
  523. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][3]);
  524.  
  525. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem4"));
  526. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][4],_str);
  527. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][4]);
  528.  
  529. static tito[100];
  530. format(tito,sizeof(tito), DestinoDasPersonagens,DOF2_GetString(_var, "Personagem2"));
  531. SetPlayerSkin(playerid, DOF2::GetInt(tito,"Skin"));
  532.  
  533. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][0]);
  534. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][1]);
  535.  
  536. static kk[50];
  537. format(kk,sizeof(kk), "%s", DOF2_GetString(_var, "Personagem2"));
  538. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][TextTito][2],kk);
  539. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][2]);
  540.  
  541. static ss[50];
  542. format(ss,sizeof(ss), "~g~$%d", DOF2_GetInt(tito, "Money"));
  543. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][TextTito][4],ss);
  544. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][4]);
  545.  
  546. static ses[50];
  547. if(DOF2_GetInt(tito,"Sexo") == 1) format(ses,sizeof(ses), "~y~Homem");
  548. if(DOF2_GetInt(tito,"Sexo") == 2) format(ses,sizeof(ses), "~y~Mulher");
  549. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][TextTito][3],ses);
  550. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][3]);
  551. }
  552. if(playertextid == TextDrawInt[playerid][information][3])
  553. {
  554. ClicadoEm[playerid] = 3;
  555. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem1"));
  556. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][1],_str);
  557. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][1]);
  558.  
  559. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem2"));
  560. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][2],_str);
  561. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][2]);
  562.  
  563. format(_str,sizeof(_str), "~r~%s", DOF2_GetString(_var, "Personagem3"));
  564. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][3],_str);
  565. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][3]);
  566.  
  567. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem4"));
  568. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][4],_str);
  569. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][4]);
  570.  
  571. static tito[100];
  572. format(tito,sizeof(tito), DestinoDasPersonagens,DOF2_GetString(_var, "Personagem3"));
  573. SetPlayerSkin(playerid, DOF2::GetInt(tito,"Skin"));
  574.  
  575. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][0]);
  576. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][1]);
  577.  
  578. static kk[50];
  579. format(kk,sizeof(kk), "%s", DOF2_GetString(_var, "Personagem3"));
  580. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][TextTito][2],kk);
  581. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][2]);
  582.  
  583. static ss[50];
  584. format(ss,sizeof(ss), "~g~$%d", DOF2_GetInt(tito, "Money"));
  585. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][TextTito][4],ss);
  586. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][4]);
  587.  
  588. static ses[50];
  589. if(DOF2_GetInt(tito,"Sexo") == 1) format(ses,sizeof(ses), "~y~Homem");
  590. if(DOF2_GetInt(tito,"Sexo") == 2) format(ses,sizeof(ses), "~y~Mulher");
  591. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][TextTito][3],ses);
  592. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][3]);
  593. }
  594. if(playertextid == TextDrawInt[playerid][information][4])
  595. {
  596. ClicadoEm[playerid] = 4;
  597. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem1"));
  598. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][1],_str);
  599. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][1]);
  600.  
  601. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem2"));
  602. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][2],_str);
  603. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][2]);
  604.  
  605. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem3"));
  606. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][3],_str);
  607. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][3]);
  608.  
  609. format(_str,sizeof(_str), "~r~%s", DOF2_GetString(_var, "Personagem4"));
  610. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][4],_str);
  611. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][4]);
  612.  
  613. static tito[100];
  614. format(tito,sizeof(tito), DestinoDasPersonagens,DOF2_GetString(_var, "Personagem4"));
  615. SetPlayerSkin(playerid, DOF2::GetInt(tito,"Skin"));
  616.  
  617. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][0]);
  618. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][1]);
  619.  
  620. static kk[50];
  621. format(kk,sizeof(kk), "%s", DOF2_GetString(_var, "Personagem4"));
  622. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][TextTito][2],kk);
  623. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][2]);
  624.  
  625. static ss[50];
  626. format(ss,sizeof(ss), "~g~$%d", DOF2_GetInt(tito, "Money"));
  627. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][TextTito][4],ss);
  628. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][4]);
  629.  
  630. static ses[50];
  631. if(DOF2_GetInt(tito,"Sexo") == 1) format(ses,sizeof(ses), "~y~Homem");
  632. if(DOF2_GetInt(tito,"Sexo") == 2) format(ses,sizeof(ses), "~y~Mulher");
  633. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][TextTito][3],ses);
  634. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][3]);
  635.  
  636. }
  637. if(playertextid == TextDrawInt[playerid][information][5])
  638. {
  639. if(ClicadoEm[playerid] == 0) return 0;
  640. if(ClicadoEm[playerid] == 1)
  641. {
  642. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem1") , false ))
  643. {
  644. ShowPlayerDialog(playerid, CREATACCOUNT, DIALOG_STYLE_INPUT, "Creat Account", " Olá senhor !\n Informe seu nome para efetuar a criação de seu char !", "Criar", "Cancelar");
  645. }
  646. }
  647. if(ClicadoEm[playerid] == 2)
  648. {
  649. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem2") , false ))
  650. {
  651. ShowPlayerDialog(playerid, CREATACCOUNT1, DIALOG_STYLE_INPUT, "Creat Account", " Olá senhor !\n Informe seu nome para efetuar a criação de seu char !", "Criar","Cancelar");
  652. }
  653. }
  654. if(ClicadoEm[playerid] == 3)
  655. {
  656. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem3") , false ))
  657. {
  658. ShowPlayerDialog(playerid, CREATACCOUNT2, DIALOG_STYLE_INPUT, "Creat Account", " Olá senhor !\n Informe seu nome para efetuar a criação de seu char !", "Criar", "Cancelar");
  659. }
  660. }
  661. if(ClicadoEm[playerid] == 4)
  662. {
  663. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem4") , false ))
  664. {
  665. ShowPlayerDialog(playerid, CREATACCOUNT3, DIALOG_STYLE_INPUT, "Creat Account", " Olá senhor !\n Informe seu nome para efetuar a criação de seu char !", "Criar", "Cancelar");
  666. }
  667. }
  668. }
  669. if(playertextid == TextDrawInt[playerid][information][7])
  670. {
  671. if(ClicadoEm[playerid] == 1)
  672. {
  673. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem1") , false ))return 1;
  674. SpawnPlayer(playerid);
  675. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][0]);
  676. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][1]);
  677. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][2]);
  678. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][3]);
  679. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][4]);
  680. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][5]);
  681. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][6]);
  682. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][7]);
  683. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][0]);
  684. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][1]);
  685. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][2]);
  686. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][3]);
  687. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][4]);
  688. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][5]);
  689. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][6]);
  690. CancelSelectTextDraw(playerid);
  691. static str[150];
  692. format(str,sizeof(str), "%s", DOF2_GetString(_var,"Personagem1"));
  693. LoadFiles(playerid, str);
  694. SetPlayerInterior(playerid, 0);
  695. logged[playerid] = true;
  696.  
  697. for(new i = 0; i <20; i ++)
  698. SendClientMessage(playerid, -1, " ");
  699.  
  700. SendClientMessage(playerid, -1, "{FFAE5E}Atenção{FFFFFF}: Se você quizer pode jogar com outro personagem seu utilize:{FFAE5E}'/{FFFFFF}logout{FFAE5E}'");
  701. format(_var,sizeof(_var),"Bem-vindo ao {FF8000}Server{FFFFFF}, {4242FF}%s{FFFFFF} você possue {66FF66}$%s{FFFFFF} no bolso.", Name(playerid), Comma(PlayerInfo[playerid][Money]));
  702. SendClientMessage(playerid, -1, _var);
  703. }
  704. if(ClicadoEm[playerid] == 2)
  705. {
  706. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem2") , false ))return 1;
  707. SpawnPlayer(playerid);
  708. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][0]);
  709. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][1]);
  710. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][2]);
  711. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][3]);
  712. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][4]);
  713. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][5]);
  714. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][6]);
  715. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][7]);
  716. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][0]);
  717. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][1]);
  718. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][2]);
  719. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][3]);
  720. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][4]);
  721. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][5]);
  722. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][6]);
  723. CancelSelectTextDraw(playerid);
  724. static str[150];
  725. format(str,sizeof(str), "%s", DOF2_GetString(_var,"Personagem2"));
  726. LoadFiles(playerid, str);
  727. SetPlayerInterior(playerid, 0);
  728. logged[playerid] = true;
  729.  
  730. for(new i = 0; i <20; i ++)
  731. SendClientMessage(playerid, -1, " ");
  732.  
  733. SendClientMessage(playerid, -1, "{FFAE5E}Atenção{FFFFFF}: Se você quizer pode jogar com outro personagem seu utilize:{FFAE5E}'/{FFFFFF}logout{FFAE5E}'");
  734. format(_var,sizeof(_var),"Bem-vindo ao {FF8000}Server{FFFFFF}, {4242FF}%s{FFFFFF} você possue {66FF66}$%s{FFFFFF} no bolso.", Name(playerid), Comma(PlayerInfo[playerid][Money]));
  735. SendClientMessage(playerid, -1, _var);
  736. }
  737. if(ClicadoEm[playerid] == 3)
  738. {
  739. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem3") , false ))return 1;
  740. SpawnPlayer(playerid);
  741. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][0]);
  742. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][1]);
  743. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][2]);
  744. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][3]);
  745. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][4]);
  746. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][5]);
  747. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][6]);
  748. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][7]);
  749. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][0]);
  750. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][1]);
  751. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][2]);
  752. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][3]);
  753. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][4]);
  754. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][5]);
  755. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][6]);
  756. CancelSelectTextDraw(playerid);
  757. static str[150];
  758. format(str,sizeof(str), "%s", DOF2_GetString(_var,"Personagem3"));
  759. LoadFiles(playerid, str);
  760. SetPlayerInterior(playerid, 0);
  761. logged[playerid] = true;
  762.  
  763. for(new i = 0; i <20; i ++)
  764. SendClientMessage(playerid, -1, " ");
  765.  
  766. SendClientMessage(playerid, -1, "{FFAE5E}Atenção{FFFFFF}: Se você quizer pode jogar com outro personagem seu utilize:{FFAE5E}'/{FFFFFF}logout{FFAE5E}'");
  767. format(_var,sizeof(_var),"Bem-vindo ao {FF8000}Server{FFFFFF}, {4242FF}%s{FFFFFF} você possue {66FF66}$%s{FFFFFF} no bolso.", Name(playerid), Comma(PlayerInfo[playerid][Money]));
  768. SendClientMessage(playerid, -1, _var);
  769. }
  770. if(ClicadoEm[playerid] == 4)
  771. {
  772. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem4") , false ))return 1;
  773. SpawnPlayer(playerid);
  774. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][0]);
  775. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][1]);
  776. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][2]);
  777. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][3]);
  778. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][4]);
  779. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][5]);
  780. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][6]);
  781. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][7]);
  782. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][0]);
  783. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][1]);
  784. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][2]);
  785. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][3]);
  786. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][4]);
  787. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][5]);
  788. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][6]);
  789. CancelSelectTextDraw(playerid);
  790. static str[150];
  791. format(str,sizeof(str), "%s", DOF2_GetString(_var,"Personagem4"));
  792. LoadFiles(playerid, str);
  793. SetPlayerInterior(playerid, 0);
  794. logged[playerid] = true;
  795.  
  796. for(new i = 0; i <20; i ++)
  797. SendClientMessage(playerid, -1, " ");
  798.  
  799. SendClientMessage(playerid, -1, "{FFAE5E}Atenção{FFFFFF}: Se você quizer pode jogar com outro personagem seu utilize:{FFAE5E}'/{FFFFFF}logout{FFAE5E}'");
  800.  
  801. format(_var,sizeof(_var),"Bem-vindo ao {FF8000}Server{FFFFFF}, {4242FF}%s{FFFFFF} você possue {66FF66}$%s{FFFFFF} no bolso.", Name(playerid), Comma(PlayerInfo[playerid][Money]));
  802. SendClientMessage(playerid, -1, _var);
  803. }
  804. }
  805. static tito[100];
  806. if(playertextid == TextDrawInt[playerid][information][6])
  807. {
  808. if(ClicadoEm[playerid] == 1)
  809. {
  810. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem1") , false )) return 1;
  811. format(tito,sizeof(tito),DestinoDasPersonagens,DOF2_GetString(_var,"Personagem1"));
  812. DOF2_RemoveFile(tito);
  813. DOF2_SetString(_var, "Personagem1", "Nao Existente");
  814. RecorLogin(playerid);
  815. }
  816. if(ClicadoEm[playerid] == 2)
  817. {
  818. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem2") , false )) return 1;
  819. format(tito,sizeof(tito),DestinoDasPersonagens,DOF2_GetString(_var,"Personagem2"));
  820. DOF2_RemoveFile(tito);
  821. DOF2_SetString(_var, "Personagem2", "Nao Existente");
  822. RecorLogin(playerid);
  823. }
  824. if(ClicadoEm[playerid] == 3)
  825. {
  826. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem3") , false )) return 1;
  827. format(tito,sizeof(tito),DestinoDasPersonagens,DOF2_GetString(_var,"Personagem3"));
  828. DOF2_RemoveFile(tito);
  829. DOF2_SetString(_var, "Personagem3", "Nao Existente");
  830. RecorLogin(playerid);
  831. }
  832. if(ClicadoEm[playerid] == 4)
  833. {
  834. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem4") , false )) return 1;
  835. format(tito,sizeof(tito),DestinoDasPersonagens,DOF2_GetString(_var,"Personagem4"));
  836. DOF2_RemoveFile(tito);
  837. DOF2_SetString(_var, "Personagem4", "Nao Existente");
  838. RecorLogin(playerid);
  839. }
  840. }
  841. return 1;
  842. }
  843. //******************************************************************************
  844. command(logout,playerid,params[])
  845. {
  846. if (logged[playerid] == true)
  847. {
  848. for(new i = 0; i <15; i ++)
  849. SendClientMessage(playerid, -1, " ");
  850.  
  851. SaveFiles(playerid);
  852. logged[playerid] = false;
  853. CreatText(playerid);
  854. InfoPlayerLogin(playerid);
  855. RecorLogin(playerid);
  856. SetPlayerScore(playerid, 0);
  857. ResetPlayerMoney(playerid);
  858. SetPlayerColor(playerid, -1);
  859. if(CharInfo[playerid][pAdmin] > 0){
  860. SendClientMessage(playerid, -1,"{9F9FFF}admin{FFFFFF}: Para você entrar no aduty , digite {C0C0C0}/aduty");
  861. loggedAduty[playerid] = false;
  862. }
  863. return 1;
  864. }
  865. return 1;
  866. }
  867. command(aduty,playerid,params[])
  868. {
  869. if (logged[playerid] == false && CharInfo[playerid][pAdmin] > 0)
  870. {
  871. SpawnPlayer(playerid);
  872. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][0]);
  873. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][1]);
  874. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][2]);
  875. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][3]);
  876. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][4]);
  877. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][5]);
  878. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][6]);
  879. PlayerTextDrawHide(playerid, TextDrawInt[playerid][information][7]);
  880. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][0]);
  881. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][1]);
  882. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][2]);
  883. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][3]);
  884. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][4]);
  885. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][5]);
  886. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][6]);
  887. CancelSelectTextDraw(playerid);
  888. SetPlayerInterior(playerid, 0);
  889. logged[playerid] = true;
  890. SetPlayerPos(playerid, 1671.5687,-1209.5769,14.9101);
  891. SetPlayerSkin(playerid, 217);
  892.  
  893. for(new i = 0; i <20; i ++)
  894. SendClientMessage(playerid, -1, " ");
  895.  
  896. SendClientMessage(playerid, -1,"{9F9FFF}admin{FFFFFF}: Você esta logado em {9F9FFF}aduty{FFFFFF}.");
  897. loggedAduty[playerid] = true;
  898. ClicadoEm[playerid] = 0;
  899. SetPlayerColor(playerid, 0xFF8000FF);
  900. return 1;
  901. }
  902. return 1;
  903. }
  904. command(admins,playerid,params[])
  905. {
  906. static text[30], _var[100];
  907. if(logged[playerid] == false)return 1;
  908. SendClientMessage(playerid, -1, "Admins : ");
  909.  
  910. for(new i = 0; i <MAX_PLAYERS; i ++)
  911. {
  912. static mm[MAX_PLAYER_NAME];
  913. GetPlayerName(i, mm ,sizeof(mm));
  914. switch(CharInfo[i][pAdmin]){
  915. case 1: text = "Beta Tester";
  916. }
  917.  
  918. if(CharInfo[i][pAdmin] > 0 && loggedAduty[i] == true)
  919. {
  920. format(_var,sizeof(_var),"{6F6FFF} %s {FFFFFF}- %s (%d)", text, mm,i);
  921. SendClientMessage(playerid, -1, _var);
  922. }
  923. }
  924. return 1;
  925. }
  926. //*************************** Admin ****************************************
  927. command(helper,playerid,params[])
  928. {
  929. static tito[900];
  930. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  931. if(CharInfo[playerid][pAdmin] == 1)
  932. {
  933. strcat(tito,"{FFA448} - Beta Tester\n\n");
  934. strcat(tito,"{FFA448}Comandos{FFFFFF}: /a /cv /ir /trazer /kick /congelar /descongelar /mp \n");
  935. strcat(tito,"{FFA448}Comandos{FFFFFF}: /explodir /spec /specoff /setskin /limparchat /up /tapa\n");
  936. }
  937. return ShowPlayerDialog ( playerid , 590 , DIALOG_STYLE_MSGBOX , "Helper Admin" , tito , "Sair" , # );
  938. }
  939.  
  940. command(a,playerid,params[])
  941. {
  942. static _var[150], text[100];
  943. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  944. if(sscanf(params,"s", text))return SendClientMessage(playerid, 0xC0C0C0FF, "CMD : /a [ Texto ]");
  945. format(_var,sizeof(_var),"%s : %s",Name(playerid), text);
  946. for(new i = 0; i <MAX_PLAYERS; i ++)
  947. {
  948. if(loggedAduty[playerid] == true)
  949. SendClientMessage(i, -1, _var);
  950. }
  951. return 1;
  952. }
  953. command(cv,playerid,params[])
  954. {
  955. static _var[150], text[100];
  956. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  957. if(sscanf(params,"s", text))return SendClientMessage(playerid, 0xC0C0C0FF, "CMD : /cv [ Texto ]");
  958. format(_var,sizeof(_var),"|Aviso|%s{FFFFFF}: %s",Name(playerid),text);
  959. SendClientMessageToAll(0x64FF64FF,_var);
  960. return 1;
  961. }
  962. command(ir,playerid,params[])
  963. {
  964. static ID, Float:Pos[3];
  965. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  966. if(sscanf(params,"d", ID))return SendClientMessage(playerid, 0xC0C0C0FF, "CMD : /ir [ ID ]");
  967. if(!IsPlayerConnected(ID))return 1;
  968. GetPlayerPos(ID, Pos[0], Pos[1], Pos[2]);
  969. SetPlayerPos(playerid,Pos[0], Pos[1], Pos[2]);
  970. SendClientMessage(playerid,0xC0C0C0FF," Você foi teleportado .");
  971. return 1;
  972. }
  973. command(trazer,playerid,params[])
  974. {
  975. static ID, Float:Pos[3];
  976. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  977. if(sscanf(params,"d", ID))return SendClientMessage(playerid, 0xC0C0C0FF, "CMD : /trazer [ ID ]");
  978. if(!IsPlayerConnected(ID))return 1;
  979. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  980. SetPlayerPos(ID,Pos[0], Pos[1], Pos[2]);
  981. SendClientMessage(ID,0xC0C0C0FF," Você foi teleportado .");
  982. return 1;
  983. }
  984. command(kick,playerid,params[])
  985. {
  986. static _var[100], ID, motivo[99];
  987. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  988. if(sscanf(params,"ds", ID, motivo))return SendClientMessage(playerid, 0xC0C0C0FF, "CMD : /kick [ ID ] [ MOTIVO ]");
  989. if(!IsPlayerConnected(ID))return 1;
  990. format(_var,sizeof(_var)," O administrador %s kickou %s , motivo: %s", Name(playerid),Name(ID),motivo);
  991. SendClientMessageToAll(0xFF8484FF,_var);
  992. Kick(ID);
  993. return 1;
  994. }
  995. command(congelar,playerid,params[])
  996. {
  997. static ID;
  998. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  999. if(sscanf(params,"d", ID))return SendClientMessage(playerid, 0xC0C0C0FF, "CMD : /congelar [ ID ]");
  1000. if(!IsPlayerConnected(ID))return 1;
  1001. TogglePlayerControllable(ID, 0);
  1002. return 1;
  1003. }
  1004. command(descongelar,playerid,params[])
  1005. {
  1006. static ID;
  1007. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  1008. if(sscanf(params,"d", ID))return SendClientMessage(playerid, 0xC0C0C0FF, "CMD : /descongelar [ ID ]");
  1009. if(!IsPlayerConnected(ID))return 1;
  1010. TogglePlayerControllable(ID, 1);
  1011. return 1;
  1012. }
  1013. command(mp,playerid,params[])
  1014. {
  1015. static ID, text[100], _var[300], str[300];
  1016. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  1017. if(sscanf(params,"d", ID))return SendClientMessage(playerid, 0xC0C0C0FF, "CMD : /mp [ ID ] [ TEXTO ]");
  1018. if(!IsPlayerConnected(ID))return 1;
  1019. if(CharInfo[ID][pAdmin] > 0) return 1;
  1020. format(_var,sizeof(_var)," MP enviado com sucesso (%s): %s ", Name(ID), text);
  1021. SendClientMessage(playerid, 0xFF8000FF,_var);
  1022. format(str,sizeof(str),"|MP| %s : %s ", Name(playerid), text);
  1023. SendClientMessage(ID, 0xFF8000FF,str);
  1024. return 1;
  1025. }
  1026. command(explodir,playerid,params[])
  1027. {
  1028. static ID, Float:Pos[3];
  1029. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  1030. if(sscanf(params,"d", ID))return SendClientMessage(playerid, 0xC0C0C0FF, "CMD : /explodir [ ID ]");
  1031. if(!IsPlayerConnected(ID))return 1;
  1032. GetPlayerPos(ID, Pos[0], Pos[1],Pos[2]);
  1033. CreateExplosion(Pos[0], Pos[1]+2 , Pos[2], 0, 1);
  1034. SendClientMessage(playerid, 0x808000FF,"Explosão criada no player!");
  1035. return 1;
  1036. }
  1037. command(spec,playerid,params[])
  1038. {
  1039. static ID;
  1040. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  1041. if(sscanf(params,"d", ID))return SendClientMessage(playerid, 0xC0C0C0FF, "CMD : /spec [ ID ]");
  1042. if(!IsPlayerConnected(ID))return 1;
  1043. PlayerSpectatePlayer(playerid, ID);
  1044. TogglePlayerSpectating(playerid, 0);
  1045. SetPlayerInterior(playerid,GetPlayerInterior(ID));
  1046. SendClientMessage(playerid, 0xC0C0C0FF,"Spec Ativado.");
  1047. return 1;
  1048. }
  1049. command(specoff,playerid,params[])
  1050. {
  1051. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  1052. TogglePlayerSpectating(playerid, 1);
  1053. SendClientMessage(playerid, 0xC0C0C0FF,"Spec desativado.");
  1054. return 1;
  1055. }
  1056. command(setskin,playerid,params[])
  1057. {
  1058. static ID, skin;
  1059. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  1060. if(sscanf(params,"dd", ID, skin))return SendClientMessage(playerid, 0xC0C0C0FF, "CMD : /setskin [ ID ] [ ID Skin ]");
  1061. if(!IsPlayerConnected(ID))return 1;
  1062. if( 1 < (skin) > 299 ) return 1;
  1063. SetPlayerSkin(ID, skin);
  1064. SendClientMessage(playerid,0xC0C0C0FF, "Skin setada(o) !");
  1065. return 1;
  1066. }
  1067.  
  1068. command(limparchat,playerid,params[])
  1069. {
  1070. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  1071. for(new i = 0; i <MAX_PLAYERS; i ++)
  1072. {
  1073. for(new s = 0; s <90; s ++)
  1074. SendClientMessage(s, -1, " ");
  1075. }
  1076. static _var[200];
  1077. format(_var,sizeof(_var),"Chat limpo por {AE5EFF}%s{C0C0C0}.", Name(playerid));
  1078. SendClientMessageToAll(0xC0C0C0FF,_var);
  1079. return 1;
  1080. }
  1081. command(up,playerid,params[])
  1082. {
  1083. new Float:Pos[3] ;
  1084. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  1085. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  1086. SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+2);
  1087. SendClientMessage(playerid,0xC0C0C0FF, "Você deu um UP em seu char!");
  1088. return 1;
  1089. }
  1090. command(tapa,playerid,params[])
  1091. {
  1092. static ID, Float:Pos[3];
  1093. if(CharInfo[playerid][pAdmin] < 1 || loggedAduty[playerid] == false)return SendClientMessage(playerid, 0xFF5151FF, "[Erro] Você não é admin ou não esta logado no aduty.");
  1094. if(sscanf(params,"d", ID))return SendClientMessage(playerid, 0xC0C0C0FF, "CMD : /tapa [ ID ]");
  1095. if(!IsPlayerConnected(ID))return 1;
  1096. GetPlayerPos(ID, Pos[0], Pos[1], Pos[2]);
  1097. SetPlayerPos(ID, Pos[0], Pos[1], Pos[2]+20);
  1098. return 1;
  1099. }
  1100. //******************************************************************************
  1101. CallBack::RecorLogin(playerid)
  1102. {
  1103. static _var[75], _str[150];
  1104. format(_var, sizeof(_var), DestinoDasContas, PlayerName(playerid));
  1105.  
  1106. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem1") , false ))
  1107. {
  1108. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem1"));
  1109. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][1],_str);
  1110. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][1], 0xFFFFFF66);
  1111. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][1]);
  1112. }
  1113. else
  1114. {
  1115. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem1"));
  1116. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][1],_str);
  1117. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][1], 0xB7B70066);
  1118. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][1]);
  1119. }
  1120.  
  1121. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem2") , false ))
  1122. {
  1123. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem2"));
  1124. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][2],_str);
  1125. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][2], 0xFFFFFF66);
  1126. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][2]);
  1127. }
  1128. else
  1129. {
  1130. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem2"));
  1131. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][2],_str);
  1132. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][2], 0xB7B70066);
  1133. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][2]);
  1134. }
  1135.  
  1136. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem3") , false ))
  1137. {
  1138. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem3"));
  1139. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][3],_str);
  1140. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][3], 0xFFFFFF66);
  1141. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][3]);
  1142. }
  1143. else
  1144. {
  1145. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem3"));
  1146. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][3],_str);
  1147. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][3], 0xB7B70066);
  1148. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][3]);
  1149. }
  1150.  
  1151. if ( !strcmp ( "Nao Existente" , DOF2_GetString(_var,"Personagem4") , false ))
  1152. {
  1153. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem4"));
  1154. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][4],_str);
  1155. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][4], 0xFFFFFF66);
  1156. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][4]);
  1157. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][4]);
  1158. }
  1159. else
  1160. {
  1161. format(_str,sizeof(_str), "%s", DOF2_GetString(_var, "Personagem4"));
  1162. PlayerTextDrawSetString(playerid, TextDrawInt[playerid][information][4],_str);
  1163. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][4], 0xB7B70066);
  1164. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][4]);
  1165. }
  1166. return 1;
  1167. }
  1168.  
  1169.  
  1170. CallBack::SaveFiles(playerid)
  1171. {
  1172. if(logged[playerid] == true && loggedAduty[playerid] == false)
  1173. {
  1174. static _var[40];
  1175. GetPlayerPos(playerid , PlayerInfo[playerid][x] , PlayerInfo[playerid][y] , PlayerInfo[playerid][z]);
  1176. GetPlayerFacingAngle(playerid, PlayerInfo[playerid][Angle]);
  1177. format(_var, sizeof(_var), DestinoDasPersonagens, Name(playerid));
  1178. DOF2_SetInt(_var, "Money", PlayerInfo[playerid][Money]);
  1179. DOF2_SetInt(_var, "Level", PlayerInfo[playerid][Level]);
  1180. DOF2_SetInt(_var, "Skin", PlayerInfo[playerid][Skin]);
  1181. DOF2_SetInt(_var, "Sexo", PlayerInfo[playerid][Sexo]);
  1182. DOF2_SetFloat(_var, "PosX", PlayerInfo[playerid][x]);
  1183. DOF2_SetFloat(_var, "PosY", PlayerInfo[playerid][y]);
  1184. DOF2_SetFloat(_var, "PosZ", PlayerInfo[playerid][z]);
  1185. DOF2_SetFloat(_var, "Angle", PlayerInfo[playerid][Angle]);
  1186. DOF2_SaveFile();
  1187. }
  1188. return 1;
  1189. }
  1190. CallBack::LoadFiles(playerid, const Player[])
  1191. {
  1192. static _var[40];
  1193. format(_var, sizeof(_var), DestinoDasPersonagens, Player);
  1194. PlayerInfo[playerid][Money] = DOF2_GetInt(_var, "Money");
  1195. PlayerInfo[playerid][Level] = DOF2_GetInt(_var, "Level");
  1196. PlayerInfo[playerid][Skin] = DOF2_GetInt(_var, "Skin");
  1197. PlayerInfo[playerid][Sexo] = DOF2_GetInt(_var, "Sexo");
  1198. GivePlayerMoney(playerid,PlayerInfo[playerid][Money]);
  1199. SetPlayerScore(playerid,PlayerInfo[playerid][Level]);
  1200. SetPlayerSkin(playerid,PlayerInfo[playerid][Skin]);
  1201. PlayerInfo[playerid][x] = DOF2_GetFloat(_var, "PosX");
  1202. PlayerInfo[playerid][y] = DOF2_GetFloat(_var, "PosY");
  1203. PlayerInfo[playerid][z] = DOF2_GetFloat(_var, "PosZ");
  1204. PlayerInfo[playerid][Angle] = DOF2_GetFloat(_var, "Angle");
  1205. SetPlayerPos(playerid, PlayerInfo[playerid][x], PlayerInfo[playerid][y] ,PlayerInfo[playerid][z]);
  1206. return 1;
  1207. }
  1208.  
  1209. CallBack::TitoCreatAccount(playerid, const NameAccont[])
  1210. {
  1211. static _var[100];
  1212. format(_var, sizeof(_var), DestinoDasPersonagens, NameAccont);
  1213. DOF2_CreateFile(_var);
  1214. DOF2_SetString(_var, "Conta", PlayerName(playerid));
  1215. DOF2_SetInt(_var, "Money", 1000);
  1216. DOF2_SetInt(_var, "Level", 1);
  1217. DOF2_SetInt(_var, "Skin", 24);
  1218. DOF2_SetString(_var, "Sexo", "Sexo Indefinido");
  1219. DOF2_SetFloat(_var, "PosX", 2029.5112);
  1220. DOF2_SetFloat(_var, "PosY", -1418.6359);
  1221. DOF2_SetFloat(_var, "PosZ", 16.9922);
  1222. DOF2_SetFloat(_var, "Angle", 180);
  1223. DOF2_SaveFile();
  1224. return 1;
  1225. }
  1226.  
  1227. CallBack::SalvarChars(playerid)
  1228. {
  1229. static _var[75];
  1230. format(_var, sizeof(_var), DestinoDasContas, PlayerName(playerid));
  1231. DOF2_SetString(_var, "Personagem1", CharInfo[playerid][Personagens][0]);
  1232. DOF2_SetString(_var, "Personagem2", CharInfo[playerid][Personagens][1]);
  1233. DOF2_SetString(_var, "Personagem3", CharInfo[playerid][Personagens][2]);
  1234. DOF2_SetString(_var, "Personagem4", CharInfo[playerid][Personagens][3]);
  1235. DOF2_SetInt(_var, "Admininistrador", CharInfo[playerid][pAdmin]);
  1236. DOF2_SaveFile();
  1237. return 1;
  1238. }
  1239.  
  1240. CallBack::CarChars(playerid)
  1241. {
  1242. static _var[75];
  1243. format(_var, sizeof(_var), DestinoDasContas, PlayerName(playerid));
  1244. CharInfo[playerid][pAdmin] = DOF2_GetInt(_var, "Admininistrador");
  1245. return 1;
  1246. }
  1247.  
  1248. stock Name(playerid)
  1249. {
  1250. static str[100], _var[100];
  1251. format(_var, sizeof(_var), DestinoDasContas, PlayerName(playerid));
  1252. static mm[MAX_PLAYER_NAME];
  1253. GetPlayerName(playerid, mm ,sizeof(mm));
  1254. if(ClicadoEm[playerid] == 0)format(str, sizeof(str), "%s", mm);
  1255. if(ClicadoEm[playerid] == 1)format(str, sizeof(str), "%s", DOF2_GetString(_var, "Personagem1"));
  1256. if(ClicadoEm[playerid] == 2)format(str, sizeof(str), "%s", DOF2_GetString(_var, "Personagem2"));
  1257. if(ClicadoEm[playerid] == 3)format(str, sizeof(str), "%s", DOF2_GetString(_var, "Personagem3"));
  1258. if(ClicadoEm[playerid] == 4)format(str, sizeof(str), "%s", DOF2_GetString(_var, "Personagem4"));
  1259. return str;
  1260. }
  1261.  
  1262. stock PlayerName(playerid)
  1263. {
  1264. static mm[MAX_PLAYER_NAME];
  1265. GetPlayerName(playerid,mm,sizeof(mm));
  1266. return mm;
  1267. }
  1268.  
  1269. CallBack::ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  1270. {
  1271. if(IsPlayerConnected(playerid))
  1272. {
  1273. static Float:posx, Float:posy, Float:posz;
  1274. static Float:oldposx, Float:oldposy, Float:oldposz;
  1275. static Float:tempposx, Float:tempposy, Float:tempposz;
  1276. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  1277. for(new i = 0; i < MAX_PLAYERS; i++)
  1278. {
  1279. if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
  1280. {
  1281. GetPlayerPos(i, posx, posy, posz);
  1282. tempposx = (oldposx -posx);
  1283. tempposy = (oldposy -posy);
  1284. tempposz = (oldposz -posz);
  1285. if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) // If the player is within 16 meters
  1286. {
  1287. SendClientMessage(i, col1, string);
  1288. }
  1289. else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) // within 8 meters
  1290. {
  1291. SendClientMessage(i, col2, string);
  1292. }
  1293. else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) //4 meters
  1294. {
  1295. SendClientMessage(i, col3, string);
  1296. }
  1297. else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) //2 meters
  1298. {
  1299. SendClientMessage(i, col4, string);
  1300. }
  1301. else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) //1 meter
  1302. {
  1303. SendClientMessage(i, col5, string);
  1304. }
  1305. }
  1306. else
  1307. {
  1308. SendClientMessage(i, col1, string);
  1309. }
  1310. }
  1311. }
  1312. return 1;
  1313. }
  1314.  
  1315. CallBack::CreatText(playerid)
  1316. {
  1317. SpawnPlayer(playerid);
  1318. SetPlayerCameraPos(playerid, 1730.3738, -1643.0079, 25.1794);
  1319. SetPlayerCameraLookAt(playerid, 1729.5604, -1643.5969, 24.8593);
  1320. SetPlayerPos(playerid,1715.6434,-1648.4926,20.2257);
  1321. SetPlayerFacingAngle(playerid, 270);
  1322. SetPlayerInterior(playerid, 18);
  1323. TogglePlayerControllable(playerid,0);
  1324.  
  1325. TextDrawInt[playerid][information][0] = CreatePlayerTextDraw(playerid, 30.000000, 114.000000, "- Persongens");
  1326. PlayerTextDrawBackgroundColor(playerid, TextDrawInt[playerid][information][0], 255);
  1327. PlayerTextDrawFont(playerid, TextDrawInt[playerid][information][0], 0);
  1328. PlayerTextDrawLetterSize(playerid, TextDrawInt[playerid][information][0], 0.740000, 2.599999);
  1329. PlayerTextDrawColor(playerid, TextDrawInt[playerid][information][0], -1);
  1330. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][information][0], 0);
  1331. PlayerTextDrawSetProportional(playerid, TextDrawInt[playerid][information][0], 1);
  1332. PlayerTextDrawSetShadow(playerid, TextDrawInt[playerid][information][0], 1);
  1333. PlayerTextDrawSetSelectable(playerid, TextDrawInt[playerid][information][0], 0);
  1334.  
  1335. TextDrawInt[playerid][information][1] = CreatePlayerTextDraw(playerid,58.000000, 154.000000, "Nao Existente");
  1336. PlayerTextDrawBackgroundColor(playerid,TextDrawInt[playerid][information][1], 255);
  1337. PlayerTextDrawFont(playerid,TextDrawInt[playerid][information][1], 1);
  1338. PlayerTextDrawLetterSize(playerid,TextDrawInt[playerid][information][1], 0.440000, 1.500000);
  1339. PlayerTextDrawColor(playerid,TextDrawInt[playerid][information][1], -1);
  1340. PlayerTextDrawSetOutline(playerid,TextDrawInt[playerid][information][1], 0);
  1341. PlayerTextDrawSetProportional(playerid,TextDrawInt[playerid][information][1], 1);
  1342. PlayerTextDrawSetShadow(playerid,TextDrawInt[playerid][information][1], 1);
  1343. PlayerTextDrawUseBox(playerid,TextDrawInt[playerid][information][1], 1);
  1344. PlayerTextDrawBoxColor(playerid,TextDrawInt[playerid][information][1], -154);
  1345. PlayerTextDrawTextSize(playerid,TextDrawInt[playerid][information][1], 245.000000, 100.000000);
  1346. PlayerTextDrawSetSelectable(playerid,PlayerText:TextDrawInt[playerid][information][1], 1);
  1347.  
  1348. TextDrawInt[playerid][information][2] = CreatePlayerTextDraw(playerid, 58.000000, 178.000000, "Nao Existente");
  1349. PlayerTextDrawBackgroundColor(playerid, TextDrawInt[playerid][information][2], 255);
  1350. PlayerTextDrawFont(playerid, TextDrawInt[playerid][information][2], 1);
  1351. PlayerTextDrawLetterSize(playerid, TextDrawInt[playerid][information][2], 0.440000, 1.500000);
  1352. PlayerTextDrawColor(playerid, TextDrawInt[playerid][information][2], -1);
  1353. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][information][2], 0);
  1354. PlayerTextDrawSetProportional(playerid, TextDrawInt[playerid][information][2], 1);
  1355. PlayerTextDrawSetShadow(playerid, TextDrawInt[playerid][information][2], 1);
  1356. PlayerTextDrawUseBox(playerid, TextDrawInt[playerid][information][2], 1);
  1357. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][2], -154);
  1358. PlayerTextDrawTextSize(playerid, TextDrawInt[playerid][information][2], 245.000000, 100.000000);
  1359. PlayerTextDrawSetSelectable(playerid, TextDrawInt[playerid][information][2], 1);
  1360.  
  1361. TextDrawInt[playerid][information][3] = CreatePlayerTextDraw(playerid, 58.000000, 202.000000, "Nao Existente");
  1362. PlayerTextDrawBackgroundColor(playerid, TextDrawInt[playerid][information][3], 255);
  1363. PlayerTextDrawFont(playerid, TextDrawInt[playerid][information][3], 1);
  1364. PlayerTextDrawLetterSize(playerid, TextDrawInt[playerid][information][3], 0.440000, 1.500000);
  1365. PlayerTextDrawColor(playerid, TextDrawInt[playerid][information][3], -1);
  1366. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][information][3], 0);
  1367. PlayerTextDrawSetProportional(playerid, TextDrawInt[playerid][information][3], 1);
  1368. PlayerTextDrawSetShadow(playerid, TextDrawInt[playerid][information][3], 1);
  1369. PlayerTextDrawUseBox(playerid, TextDrawInt[playerid][information][3], 1);
  1370. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][3], -154);
  1371. PlayerTextDrawTextSize(playerid, TextDrawInt[playerid][information][3], 245.000000, 100.000000);
  1372. PlayerTextDrawSetSelectable(playerid, TextDrawInt[playerid][information][3], 1);
  1373.  
  1374. TextDrawInt[playerid][information][4] = CreatePlayerTextDraw(playerid, 58.000000, 226.000000, "Nao Existente");
  1375. PlayerTextDrawBackgroundColor(playerid, TextDrawInt[playerid][information][4], 255);
  1376. PlayerTextDrawFont(playerid, TextDrawInt[playerid][information][4], 1);
  1377. PlayerTextDrawLetterSize(playerid, TextDrawInt[playerid][information][4], 0.440000, 1.500000);
  1378. PlayerTextDrawColor(playerid, TextDrawInt[playerid][information][4], -1);
  1379. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][information][4], 0);
  1380. PlayerTextDrawSetProportional(playerid, TextDrawInt[playerid][information][4], 1);
  1381. PlayerTextDrawSetShadow(playerid, TextDrawInt[playerid][information][4], 1);
  1382. PlayerTextDrawUseBox(playerid, TextDrawInt[playerid][information][4], 1);
  1383. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][4], -154);
  1384. PlayerTextDrawTextSize(playerid, TextDrawInt[playerid][information][4], 245.000000, 100.000000);
  1385. PlayerTextDrawSetSelectable(playerid, TextDrawInt[playerid][information][4], 1);
  1386.  
  1387. TextDrawInt[playerid][information][5] = CreatePlayerTextDraw(playerid, 57.000000, 250.000000, "Criar");
  1388. PlayerTextDrawBackgroundColor(playerid, TextDrawInt[playerid][information][5], 255);
  1389. PlayerTextDrawFont(playerid, TextDrawInt[playerid][information][5], 1);
  1390. PlayerTextDrawLetterSize(playerid, TextDrawInt[playerid][information][5], 0.450000, 1.300000);
  1391. PlayerTextDrawColor(playerid, TextDrawInt[playerid][information][5], -1);
  1392. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][information][5], 0);
  1393. PlayerTextDrawSetProportional(playerid, TextDrawInt[playerid][information][5], 1);
  1394. PlayerTextDrawSetShadow(playerid, TextDrawInt[playerid][information][5], 1);
  1395. PlayerTextDrawUseBox(playerid, TextDrawInt[playerid][information][5], 1);
  1396. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][5], 1795123814);
  1397. PlayerTextDrawTextSize(playerid, TextDrawInt[playerid][information][5], 93.000000, 100.000000);
  1398. PlayerTextDrawSetSelectable(playerid, TextDrawInt[playerid][information][5], 1);
  1399.  
  1400. TextDrawInt[playerid][information][6] = CreatePlayerTextDraw(playerid, 100.000000, 250.000000, "Deletar");
  1401. PlayerTextDrawBackgroundColor(playerid, TextDrawInt[playerid][information][6], 255);
  1402. PlayerTextDrawFont(playerid, TextDrawInt[playerid][information][6], 1);
  1403. PlayerTextDrawLetterSize(playerid, TextDrawInt[playerid][information][6], 0.450000, 1.300000);
  1404. PlayerTextDrawColor(playerid, TextDrawInt[playerid][information][6], -1);
  1405. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][information][6], 0);
  1406. PlayerTextDrawSetProportional(playerid, TextDrawInt[playerid][information][6], 1);
  1407. PlayerTextDrawSetShadow(playerid, TextDrawInt[playerid][information][6], 1);
  1408. PlayerTextDrawUseBox(playerid, TextDrawInt[playerid][information][6], 1);
  1409. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][6], -11579546);
  1410. PlayerTextDrawTextSize(playerid, TextDrawInt[playerid][information][6], 152.000000, 100.000000);
  1411. PlayerTextDrawSetSelectable(playerid, TextDrawInt[playerid][information][6], 1);
  1412.  
  1413. TextDrawInt[playerid][information][7] = CreatePlayerTextDraw(playerid, 172.000000, 250.000000, "Selecionar");
  1414. PlayerTextDrawBackgroundColor(playerid, TextDrawInt[playerid][information][7], 255);
  1415. PlayerTextDrawFont(playerid, TextDrawInt[playerid][information][7], 1);
  1416. PlayerTextDrawLetterSize(playerid, TextDrawInt[playerid][information][7], 0.450000, 1.300000);
  1417. PlayerTextDrawColor(playerid, TextDrawInt[playerid][information][7], -1);
  1418. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][information][7], 0);
  1419. PlayerTextDrawSetProportional(playerid, TextDrawInt[playerid][information][7], 1);
  1420. PlayerTextDrawSetShadow(playerid, TextDrawInt[playerid][information][7], 1);
  1421. PlayerTextDrawUseBox(playerid, TextDrawInt[playerid][information][7], 1);
  1422. PlayerTextDrawBoxColor(playerid, TextDrawInt[playerid][information][7], -6869146);
  1423. PlayerTextDrawTextSize(playerid, TextDrawInt[playerid][information][7], 245.000000, 100.000000);
  1424. PlayerTextDrawSetSelectable(playerid, TextDrawInt[playerid][information][7], 1);
  1425.  
  1426. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][0]);
  1427. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][1]);
  1428. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][2]);
  1429. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][3]);
  1430. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][4]);
  1431. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][5]);
  1432. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][6]);
  1433. PlayerTextDrawShow(playerid, TextDrawInt[playerid][information][7]);
  1434. SelectTextDraw(playerid, 0xFFFFFFFF);
  1435. RecorLogin(playerid);
  1436. InfoPlayerLogin(playerid);
  1437. return 1;
  1438. }
  1439.  
  1440. CallBack::InfoPlayerLogin(playerid)
  1441. {
  1442. TextDrawInt[playerid][TextTito][0] = CreatePlayerTextDraw(playerid,30.000000, 271.000000, "- Informacoes");
  1443. PlayerTextDrawBackgroundColor(playerid,TextDrawInt[playerid][TextTito][0], 255);
  1444. PlayerTextDrawFont(playerid,TextDrawInt[playerid][TextTito][0], 0);
  1445. PlayerTextDrawLetterSize(playerid,TextDrawInt[playerid][TextTito][0], 0.740000, 2.599998);
  1446. PlayerTextDrawColor(playerid, TextDrawInt[playerid][TextTito][0], -1);
  1447. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][TextTito][0], 0);
  1448. PlayerTextDrawSetProportional(playerid,TextDrawInt[playerid][TextTito][0], 1);
  1449. PlayerTextDrawSetShadow(playerid, TextDrawInt[playerid][TextTito][0], 1);
  1450. PlayerTextDrawSetSelectable(playerid,TextDrawInt[playerid][TextTito][0], 0);
  1451.  
  1452. TextDrawInt[playerid][TextTito][1] = CreatePlayerTextDraw(playerid,58.000000, 306.000000, "_");
  1453. PlayerTextDrawBackgroundColor(playerid,TextDrawInt[playerid][TextTito][1], 255);
  1454. PlayerTextDrawFont(playerid,TextDrawInt[playerid][TextTito][1], 1);
  1455. PlayerTextDrawLetterSize(playerid,TextDrawInt[playerid][TextTito][1], 0.500000, 11.000000);
  1456. PlayerTextDrawColor(playerid, TextDrawInt[playerid][TextTito][1], -1);
  1457. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][TextTito][1], 0);
  1458. PlayerTextDrawSetProportional(playerid,TextDrawInt[playerid][TextTito][1], 1);
  1459. PlayerTextDrawSetShadow(playerid,TextDrawInt[playerid][TextTito][1], 1);
  1460. PlayerTextDrawUseBox(playerid,TextDrawInt[playerid][TextTito][1], 1);
  1461. PlayerTextDrawBoxColor(playerid,TextDrawInt[playerid][TextTito][1], -154);
  1462. PlayerTextDrawTextSize(playerid,TextDrawInt[playerid][TextTito][1], 246.000000, 94.000000);
  1463. PlayerTextDrawSetSelectable(playerid,TextDrawInt[playerid][TextTito][1], 0);
  1464.  
  1465. TextDrawInt[playerid][TextTito][2] = CreatePlayerTextDraw(playerid,60.000000, 310.000000, " ");
  1466. PlayerTextDrawBackgroundColor(playerid,TextDrawInt[playerid][TextTito][2], 255);
  1467. PlayerTextDrawFont(playerid,TextDrawInt[playerid][TextTito][2], 1);
  1468. PlayerTextDrawLetterSize(playerid,TextDrawInt[playerid][TextTito][2], 0.500000, 1.000000);
  1469. PlayerTextDrawColor(playerid, TextDrawInt[playerid][TextTito][2], -1);
  1470. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][TextTito][2], 1);
  1471. PlayerTextDrawSetProportional(playerid,TextDrawInt[playerid][TextTito][2], 1);
  1472. PlayerTextDrawSetSelectable(playerid,TextDrawInt[playerid][TextTito][2], 0);
  1473.  
  1474. TextDrawInt[playerid][TextTito][3] = CreatePlayerTextDraw(playerid,70.000000, 328.000000, " ");
  1475. PlayerTextDrawBackgroundColor(playerid,TextDrawInt[playerid][TextTito][3], 255);
  1476. PlayerTextDrawFont(playerid,TextDrawInt[playerid][TextTito][3], 1);
  1477. PlayerTextDrawLetterSize(playerid,TextDrawInt[playerid][TextTito][3], 0.370000, 0.899999);
  1478. PlayerTextDrawColor(playerid, TextDrawInt[playerid][TextTito][3], -1);
  1479. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][TextTito][3], 1);
  1480. PlayerTextDrawSetProportional(playerid,TextDrawInt[playerid][TextTito][3], 1);
  1481. PlayerTextDrawSetSelectable(playerid,TextDrawInt[playerid][TextTito][3], 0);
  1482.  
  1483. TextDrawInt[playerid][TextTito][4] = CreatePlayerTextDraw(playerid,177.000000, 394.000000, " ");
  1484. PlayerTextDrawBackgroundColor(playerid,TextDrawInt[playerid][TextTito][4], 255);
  1485. PlayerTextDrawFont(playerid,TextDrawInt[playerid][TextTito][4], 1);
  1486. PlayerTextDrawLetterSize(playerid,TextDrawInt[playerid][TextTito][4], 0.390000, 0.899999);
  1487. PlayerTextDrawColor(playerid, TextDrawInt[playerid][TextTito][4], 1543461734);
  1488. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][TextTito][4], 1);
  1489. PlayerTextDrawSetProportional(playerid,TextDrawInt[playerid][TextTito][4], 1);
  1490. PlayerTextDrawSetSelectable(playerid,TextDrawInt[playerid][TextTito][4], 0);
  1491.  
  1492. TextDrawInt[playerid][TextTito][5] = CreatePlayerTextDraw(playerid,63.000000, 350.000000, " ");
  1493. PlayerTextDrawBackgroundColor(playerid,TextDrawInt[playerid][TextTito][5], 255);
  1494. PlayerTextDrawFont(playerid,TextDrawInt[playerid][TextTito][5], 1);
  1495. PlayerTextDrawLetterSize(playerid,TextDrawInt[playerid][TextTito][5], 0.370000, 0.899999);
  1496. PlayerTextDrawColor(playerid, TextDrawInt[playerid][TextTito][5], -65281);
  1497. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][TextTito][5], 1);
  1498. PlayerTextDrawSetProportional(playerid,TextDrawInt[playerid][TextTito][5], 1);
  1499. PlayerTextDrawSetSelectable(playerid,TextDrawInt[playerid][TextTito][5], 0);
  1500.  
  1501. TextDrawInt[playerid][TextTito][6] = CreatePlayerTextDraw(playerid,67.000000, 367.000000, " ");
  1502. PlayerTextDrawBackgroundColor(playerid,TextDrawInt[playerid][TextTito][6], 255);
  1503. PlayerTextDrawFont(playerid,TextDrawInt[playerid][TextTito][6], 1);
  1504. PlayerTextDrawLetterSize(playerid,TextDrawInt[playerid][TextTito][6], 0.320000, 0.799999);
  1505. PlayerTextDrawColor(playerid, TextDrawInt[playerid][TextTito][6], -1);
  1506. PlayerTextDrawSetOutline(playerid, TextDrawInt[playerid][TextTito][6], 1);
  1507. PlayerTextDrawSetProportional(playerid,TextDrawInt[playerid][TextTito][6], 1);
  1508. PlayerTextDrawSetSelectable(playerid,TextDrawInt[playerid][TextTito][6], 0);
  1509.  
  1510. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][0]);
  1511. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][1]);
  1512. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][2]);
  1513. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][3]);
  1514. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][4]);
  1515. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][5]);
  1516. PlayerTextDrawShow(playerid, TextDrawInt[playerid][TextTito][6]);
  1517.  
  1518. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][0]);
  1519. PlayerTextDrawHide(playerid, TextDrawInt[playerid][TextTito][1]);
  1520. return 1;
  1521. }
  1522. stock Comma(numbers) //by Gamer931215
  1523. {
  1524. new temp[100],counter = -1;
  1525. valstr(temp,numbers);
  1526. for(new i = strlen(temp);i > 0; i--)
  1527. {
  1528. counter++;
  1529. if(counter == 3)
  1530. {
  1531. strins(temp,",",i);
  1532. counter = 0;
  1533. }
  1534. }
  1535. return temp;
  1536. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement