Ghosther

jpao

Aug 5th, 2015
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.95 KB | None | 0 0
  1. //==============================INCLUDES=============================//
  2. #include <a_samp>
  3. #include <ZCMD>
  4. #include <sscanf>
  5. #include <streamer>
  6. #include <DOF2>
  7.  
  8. #pragma unused ret_memcpy
  9. //==============================CORES=============================//
  10. #define COR_AVISO 0xBEBEBEFF
  11. #define COR_ADMIN 0x436EEEFF
  12. #define COR_SUCESSO 0xCAE1FFFF
  13. //==============================DEFINIÇÕES=============================//
  14. #define DIALOG_REGISTRO 1
  15. #define DIALOG_LOGIN 2
  16.  
  17. //==============================NEW'S=============================//
  18. new Text:Inicioserver[15];
  19.  
  20. new
  21. String[256],
  22. Arquivo[40],
  23. Level[MAX_PLAYERS],
  24. Skin[MAX_PLAYERS],
  25. ERRO[MAX_PLAYERS]
  26. ;
  27.  
  28.  
  29. //==============================Forward'S=============================//
  30.  
  31. enum pInfo
  32. {
  33. Temp,
  34. Logged
  35. }
  36.  
  37. //==============================FIM=============================//
  38.  
  39.  
  40.  
  41. main()
  42. {
  43. print("\n----------------------------------");
  44. print(" SelokeCachurrera by Jefferson");
  45. print("----------------------------------\n");
  46. }
  47.  
  48. /******************************************************************************/
  49.  
  50. // New's
  51.  
  52.  
  53.  
  54. public OnGameModeInit()
  55. {
  56. print("\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
  57. print(" SISTEMA DE REGISTRO/LOGIN CARREGADO COM SUCESSO");
  58. print(" SELOKEN CACHURRERA");
  59. print("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n");
  60. //====================================================
  61.  
  62. Inicioserver[0] = TextDrawCreate(29.000000, 154.000000, "Essence");
  63. TextDrawBackgroundColor(Inicioserver[0], 255);
  64. TextDrawFont(Inicioserver[0], 3);
  65. TextDrawLetterSize(Inicioserver[0], 0.769999, 3.899997);
  66. TextDrawColor(Inicioserver[0], -1);
  67. TextDrawSetOutline(Inicioserver[0], 1);
  68. TextDrawSetProportional(Inicioserver[0], 1);
  69.  
  70. Inicioserver[1] = TextDrawCreate(28.000000, 188.000000, "DayZ");
  71. TextDrawBackgroundColor(Inicioserver[1], 255);
  72. TextDrawFont(Inicioserver[1], 1);
  73. TextDrawLetterSize(Inicioserver[1], 0.619998, 2.599998);
  74. TextDrawColor(Inicioserver[1], -1);
  75. TextDrawSetOutline(Inicioserver[1], 1);
  76. TextDrawSetProportional(Inicioserver[1], 1);
  77.  
  78. Inicioserver[2] = TextDrawCreate(108.000000, 188.000000, "1.0");
  79. TextDrawBackgroundColor(Inicioserver[2], 255);
  80. TextDrawFont(Inicioserver[2], 1);
  81. TextDrawLetterSize(Inicioserver[2], 0.550000, 2.700001);
  82. TextDrawColor(Inicioserver[2], -1);
  83. TextDrawSetOutline(Inicioserver[2], 1);
  84. TextDrawSetProportional(Inicioserver[2], 1);
  85.  
  86. Inicioserver[13] = TextDrawCreate(644.000000, 355.000000, "_");
  87. TextDrawFont(Inicioserver[13], 1);
  88. TextDrawLetterSize(Inicioserver[13], 0.500000, -0.099999);
  89. TextDrawColor(Inicioserver[13], -1);
  90. TextDrawSetOutline(Inicioserver[13], 0);
  91. TextDrawSetProportional(Inicioserver[13], 1);
  92. TextDrawSetShadow(Inicioserver[13], 1);
  93. TextDrawUseBox(Inicioserver[13], 1);
  94. TextDrawBoxColor(Inicioserver[13], 396367716);
  95. TextDrawTextSize(Inicioserver[13], -4.000000, 0.000000);
  96.  
  97. Inicioserver[14] = TextDrawCreate(644.000000, 67.000000, "_");
  98. TextDrawBackgroundColor(Inicioserver[14], 255);
  99. TextDrawFont(Inicioserver[14], 1);
  100. TextDrawLetterSize(Inicioserver[14], 0.500000, -0.099999);
  101. TextDrawColor(Inicioserver[14], -1);
  102. TextDrawSetOutline(Inicioserver[14], 0);
  103. TextDrawSetProportional(Inicioserver[14], 1);
  104. TextDrawSetShadow(Inicioserver[14], 1);
  105. TextDrawUseBox(Inicioserver[14], 1);
  106. TextDrawBoxColor(Inicioserver[14], 396367716);
  107. TextDrawTextSize(Inicioserver[14], -4.000000, 0.000000);
  108. TextDrawSetSelectable(Inicioserver[14], 0);
  109.  
  110. Inicioserver[3] = TextDrawCreate(644.000000, 2.000000, "_");
  111. TextDrawBackgroundColor(Inicioserver[3], 255);
  112. TextDrawFont(Inicioserver[3], 1);
  113. TextDrawLetterSize(Inicioserver[3], 0.500000, 6.800000);
  114. TextDrawColor(Inicioserver[3], -1);
  115. TextDrawSetOutline(Inicioserver[3], 0);
  116. TextDrawSetProportional(Inicioserver[3], 1);
  117. TextDrawSetShadow(Inicioserver[3], 1);
  118. TextDrawUseBox(Inicioserver[3], 1);
  119. TextDrawBoxColor(Inicioserver[3], 33686116);
  120. TextDrawTextSize(Inicioserver[3], -4.000000, 0.000000);
  121.  
  122. Inicioserver[4] = TextDrawCreate(644.000000, 358.000000, "_");
  123. TextDrawBackgroundColor(Inicioserver[4], 255);
  124. TextDrawFont(Inicioserver[4], 1);
  125. TextDrawLetterSize(Inicioserver[4], 0.500000, 10.000002);
  126. TextDrawColor(Inicioserver[4], -1);
  127. TextDrawSetOutline(Inicioserver[4], 0);
  128. TextDrawSetProportional(Inicioserver[4], 1);
  129. TextDrawSetShadow(Inicioserver[4], 1);
  130. TextDrawUseBox(Inicioserver[4], 1);
  131. TextDrawBoxColor(Inicioserver[4], 33686116);
  132. TextDrawTextSize(Inicioserver[4], -4.000000, 0.000000);
  133.  
  134. //============
  135. Inicioserver[9] = TextDrawCreate(587.000000, 218.000000, "_");
  136. TextDrawBackgroundColor(Inicioserver[9], 255);
  137. TextDrawFont(Inicioserver[9], 1);
  138. TextDrawLetterSize(Inicioserver[9], 0.500000, 2.000002);
  139. TextDrawColor(Inicioserver[9], -1);
  140. TextDrawSetOutline(Inicioserver[9], 0);
  141. TextDrawSetProportional(Inicioserver[9], 1);
  142. TextDrawSetShadow(Inicioserver[9], 1);
  143. TextDrawUseBox(Inicioserver[9], 1);
  144. TextDrawBoxColor(Inicioserver[9], 33686116);
  145. TextDrawTextSize(Inicioserver[9], 510.000000, 0.000000);
  146. TextDrawSetSelectable(Inicioserver[9], 0);
  147.  
  148. Inicioserver[10] = TextDrawCreate(587.000000, 239.000000, "_");
  149. TextDrawBackgroundColor(Inicioserver[10], 255);
  150. TextDrawFont(Inicioserver[10], 1);
  151. TextDrawLetterSize(Inicioserver[10], 0.500000, 2.000002);
  152. TextDrawColor(Inicioserver[10], -1);
  153. TextDrawSetOutline(Inicioserver[10], 0);
  154. TextDrawSetProportional(Inicioserver[10], 1);
  155. TextDrawSetShadow(Inicioserver[10], 1);
  156. TextDrawUseBox(Inicioserver[10], 1);
  157. TextDrawBoxColor(Inicioserver[10], 33686116);
  158. TextDrawTextSize(Inicioserver[10], 510.000000, 0.000000);
  159. TextDrawSetSelectable(Inicioserver[10], 0);
  160.  
  161. Inicioserver[11] = TextDrawCreate(587.000000, 260.000000, "_");
  162. TextDrawBackgroundColor(Inicioserver[11], 255);
  163. TextDrawFont(Inicioserver[11], 1);
  164. TextDrawLetterSize(Inicioserver[11], 0.500000, 2.000002);
  165. TextDrawColor(Inicioserver[11], -1);
  166. TextDrawSetOutline(Inicioserver[11], 0);
  167. TextDrawSetProportional(Inicioserver[11], 1);
  168. TextDrawSetShadow(Inicioserver[11], 1);
  169. TextDrawUseBox(Inicioserver[11], 1);
  170. TextDrawBoxColor(Inicioserver[11], 33686116);
  171. TextDrawTextSize(Inicioserver[11], 510.000000, 0.000000);
  172. TextDrawSetSelectable(Inicioserver[11], 0);
  173.  
  174. Inicioserver[12] = TextDrawCreate(587.000000, 281.000000, "_");
  175. TextDrawBackgroundColor(Inicioserver[12], 255);
  176. TextDrawFont(Inicioserver[12], 1);
  177. TextDrawLetterSize(Inicioserver[12], 0.500000, 2.000002);
  178. TextDrawColor(Inicioserver[12], -1);
  179. TextDrawSetOutline(Inicioserver[12], 0);
  180. TextDrawSetProportional(Inicioserver[12], 1);
  181. TextDrawSetShadow(Inicioserver[12], 1);
  182. TextDrawUseBox(Inicioserver[12], 1);
  183. TextDrawBoxColor(Inicioserver[12], 33686116);
  184. TextDrawTextSize(Inicioserver[12], 510.000000, 0.000000);
  185. TextDrawSetSelectable(Inicioserver[12], 0);
  186.  
  187. //=====================[BOTOENS DO INICIO DO SERVER]=========================
  188. Inicioserver[5] = TextDrawCreate(521.000000, 217.000000, "CONTINUAR");
  189. TextDrawBackgroundColor(Inicioserver[5], 255);
  190. TextDrawFont(Inicioserver[5], 2);
  191. TextDrawLetterSize(Inicioserver[5], 0.239999, 2.099999);
  192. TextDrawColor(Inicioserver[5], -1);
  193. TextDrawSetOutline(Inicioserver[5], 1);
  194. TextDrawSetProportional(Inicioserver[5], 1);
  195. TextDrawUseBox(Inicioserver[5], 1);
  196. TextDrawBoxColor(Inicioserver[5], -0);
  197. TextDrawTextSize(Inicioserver[5], 580.000000, 12.000000);
  198.  
  199. Inicioserver[6] = TextDrawCreate(522.000000, 237.000000, "REGISTRAR");
  200. TextDrawBackgroundColor(Inicioserver[6], 255);
  201. TextDrawFont(Inicioserver[6], 2);
  202. TextDrawLetterSize(Inicioserver[6], 0.239999, 2.099999);
  203. TextDrawColor(Inicioserver[6], -1);
  204. TextDrawSetOutline(Inicioserver[6], 1);
  205. TextDrawSetProportional(Inicioserver[6], 1);
  206. TextDrawUseBox(Inicioserver[6], 1);
  207. TextDrawBoxColor(Inicioserver[6], -0);
  208. TextDrawTextSize(Inicioserver[6], 580.000000, 12.000000);
  209.  
  210. Inicioserver[7] = TextDrawCreate(525.000000, 258.000000, "CREDITOS");
  211. TextDrawBackgroundColor(Inicioserver[7], 255);
  212. TextDrawFont(Inicioserver[7], 2);
  213. TextDrawLetterSize(Inicioserver[7], 0.239999, 2.099999);
  214. TextDrawColor(Inicioserver[7], -1);
  215. TextDrawSetOutline(Inicioserver[7], 1);
  216. TextDrawSetProportional(Inicioserver[7], 1);
  217. TextDrawUseBox(Inicioserver[7], 1);
  218. TextDrawBoxColor(Inicioserver[7], -0);
  219. TextDrawTextSize(Inicioserver[7], 580.000000, 12.000000);
  220.  
  221. Inicioserver[8] = TextDrawCreate(536.000000, 280.000000, "SAIR");
  222. TextDrawBackgroundColor(Inicioserver[8], 255);
  223. TextDrawFont(Inicioserver[8], 2);
  224. TextDrawLetterSize(Inicioserver[8], 0.239999, 2.099999);
  225. TextDrawColor(Inicioserver[8], -1);
  226. TextDrawSetOutline(Inicioserver[8], 1);
  227. TextDrawSetProportional(Inicioserver[8], 1);
  228. TextDrawUseBox(Inicioserver[8], 1);
  229. TextDrawBoxColor(Inicioserver[8], -0);
  230. TextDrawTextSize(Inicioserver[8], 580.000000, 12.000000);
  231.  
  232. TextDrawSetSelectable(Inicioserver[5], true);
  233. TextDrawSetSelectable(Inicioserver[6], true);
  234. TextDrawSetSelectable(Inicioserver[7], true);
  235. TextDrawSetSelectable(Inicioserver[8], true);
  236. //====================================================
  237.  
  238. return 1;
  239. }
  240.  
  241.  
  242. public OnGameModeExit()
  243. {
  244. DOF2_Exit();
  245. return 1;
  246. }
  247.  
  248. public OnPlayerConnect(playerid)
  249. {
  250. limparChat(playerid, 50);
  251. SpawnPlayer(playerid);
  252. SetPlayerCameraPos(playerid, -2551.77, 2751.12, 130.06);
  253. SetPlayerCameraLookAt(playerid, -2557.27, 2748.87, 129.20);
  254. SelectTextDraw(playerid, 0x1AB51AFF);
  255. for(new txd = 0; txd <= 16; txd++) TextDrawShowForPlayer(playerid, Inicioserver[txd]);
  256. return 1;
  257. }
  258.  
  259. public OnPlayerDisconnect(playerid, reason)
  260. {
  261. SalvarPlayer(playerid);
  262. return 1;
  263. }
  264.  
  265. public OnPlayerRequestClass(playerid, classid)
  266. {
  267. SpawnPlayer(playerid);
  268. SetPlayerCameraPos(playerid, -2551.77, 2751.12, 130.06);
  269. SetPlayerCameraLookAt(playerid, -2557.27, 2748.87, 129.20);
  270. return 1;
  271. }
  272.  
  273. public OnPlayerSpawn(playerid)
  274. {
  275. for(new txd = 0; txd <= 16; txd++) TextDrawHideForPlayer(playerid, Inicioserver[txd]);
  276. return 1;
  277. }
  278.  
  279. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  280. {
  281. switch (dialogid)
  282. {
  283.  
  284. case DIALOG_REGISTRO:
  285. {
  286.  
  287. if(response)
  288. {
  289.  
  290. if(strlen(inputtext) < 2 || strlen(inputtext) > 16 &&!strlen(inputtext))
  291. {
  292.  
  293. SendClientMessage(playerid, COR_AVISO, ">> Digite uma Senha com no Minimo 2 caracteres ou no Maximo 16");
  294. format(String, sizeof(String),"{FFFFFF}Bem Vindo(a) Ao Servidor {F72429}%s{F8F8FF}\n\nVoce nao tem uma Conta registrada\n\nDigite uma senha para Registrar\n\nStatus: {F72429}Nao Registrado{FFFFFF}\n\nIP: {F72429}%s", Nome(playerid), IP(playerid));
  295. ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "[X] REGISTRO [X]", String, "PRONTO", "SAIR"); return 1;
  296. }
  297.  
  298. DOF2_SaveFile();
  299. SendClientMessage(playerid, COR_SUCESSO, ">> Registrado Com Sucesso Digite sua Senha para Logar.");
  300. format(String, sizeof(String),"{F8F8FF}Bem Vindo(a) Ao Servidor {40E337}%s{F8F8FF}\n\nDigite sua Senha para Logar\n\nStatus: {40E337}Registrado(a){FFFFFF}\n\nIP: {40E337}%s", Nome(playerid), IP(playerid));
  301. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "[x] LOGAR [X]", String, "LOGAR", "SAIR");
  302.  
  303. return 1;
  304. }
  305. else
  306. {
  307.  
  308. format(String, sizeof(String),"• O Jogador(a) %s foi Kickado do Servidor | Motivo: Nao Registrou-se |", Nome(playerid), IP(playerid));
  309. SendClientMessageToAll(COR_ADMIN, String);
  310. Kick(playerid);
  311. }
  312. }
  313. case DIALOG_LOGIN:
  314. {
  315.  
  316. if(response)
  317. {
  318.  
  319. if(!strlen(inputtext))
  320. {
  321.  
  322. SendClientMessage(playerid, COR_AVISO, ">> Voce precisa digitar Sua Senha para Logar.");
  323. format(String, sizeof(String),"{F8F8FF}Bem Vindo(a) Ao Servidor {40E337}%s{F8F8FF}\n\nDigite sua Senha para Logar\n\nStatus: {40E337}Registrado(a){FFFFFF}\n\nIP: {40E337}%s", Nome(playerid), IP(playerid));
  324. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "[x] LOGAR [X]", String, "LOGAR", "SAIR");
  325. return 1;
  326. }
  327.  
  328. format(Arquivo, sizeof(Arquivo), "Contas/%s.ini", Nome(playerid));
  329. if(!strcmp(inputtext,DOF2_GetString(Arquivo,"Senha"), false))
  330. {
  331.  
  332. CarregarPlayer(playerid);
  333. return 1;
  334. }
  335. else
  336. {
  337.  
  338. SendClientMessage(playerid, COR_AVISO, ">> Atencao voce digitou sua senha Errado, Digite-a Novamente.");
  339. format(String, sizeof(String),"{F8F8FF}Bem Vindo(a) Ao Servidor {40E337}%s{F8F8FF}\n\nDigite sua Senha para Logar\n\nStatus: {40E337}Registrado(a){FFFFFF}\n\nIP: {40E337}%s", Nome(playerid), IP(playerid));
  340. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "[x] LOGAR [X]", String, "LOGAR", "SAIR");
  341.  
  342. ERRO[playerid]++;
  343. if(ERRO[playerid] == 3)
  344. {
  345.  
  346. format(String, sizeof(String),">> O Jogador(a) %s foi Kickado do Servidor | Motivo: Limite de Erro |", Nome(playerid), IP(playerid));
  347. SendClientMessageToAll(COR_ADMIN, String);
  348. Kick(playerid);
  349. return 1;
  350. }
  351. }
  352. }
  353. else
  354. {
  355.  
  356. format(String, sizeof(String),">> O Jogador(a) %s foi Kickado do Servidor | Motivo: Nao Registrou |", Nome(playerid), IP(playerid));
  357. SendClientMessageToAll(COR_ADMIN, String);
  358. Kick(playerid);
  359. }
  360. }
  361. }
  362. return 1;
  363. }
  364.  
  365. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  366. {
  367. format(Arquivo, sizeof(Arquivo), "Contas/%s.ini", Nome(playerid));
  368.  
  369. if(clickedid == Inicioserver[6])
  370. {
  371.  
  372. if(DOF2_FileExists(Arquivo))
  373. {
  374.  
  375. SendClientMessage(playerid, COR_AVISO, ">> Voce ja tem uma Conta, Clique em Logar para Logar.");
  376. }
  377. else
  378. {
  379. for(new txd = 0; txd <= 16; txd++) TextDrawHideForPlayer(playerid, Inicioserver[txd]);
  380. format(String, sizeof(String),"{FFFFFF}Bem Vindo(a) Ao Servidor {F72429}%s{F8F8FF}\n\nVoce nao tem uma Conta registrada\n\nDigite uma senha para Registrar\n\nStatus: {F72429}Nao Registrado{FFFFFF}\n\nIP: {F72429}%s", Nome(playerid), IP(playerid));
  381. ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "[X] REGISTRO [X]", String, "PRONTO", "SAIR");
  382. }
  383. }
  384. if(clickedid == Inicioserver[5])
  385. {
  386.  
  387. if(DOF2_FileExists(Arquivo))
  388. {
  389. for(new txd = 0; txd <= 16; txd++) TextDrawHideForPlayer(playerid, Inicioserver[txd]);
  390. format(String, sizeof(String),"{F8F8FF}Bem Vindo(a) Ao Servidor {40E337}%s{F8F8FF}\n\nDigite sua Senha para Logar\n\nStatus: {40E337}Registrado(a){FFFFFF}\n\nIP: {40E337}%s", Nome(playerid), IP(playerid));
  391. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "[x] LOGAR [X]", String, "LOGAR", "SAIR");
  392. }
  393. else
  394. {
  395.  
  396. SendClientMessage(playerid, COR_AVISO, ">> Voce nao tem uma Conta, Clique em Registrar para Registrar.");
  397. }
  398. }
  399. if(clickedid == Inicioserver[7])
  400. {
  401. SendClientMessage(playerid, COR_AVISO, "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- CREDITOS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
  402. SendClientMessage(playerid, COR_AVISO, ">> [Nome do server], e um servidor unico totalmente criado por: [seu nome].");
  403. SendClientMessage(playerid, COR_AVISO, ">> Para contato com o [seu nome] adcione no skype: [seu skype]");
  404. SendClientMessage(playerid, COR_AVISO, "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- CREDITOS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=");
  405. }
  406. if(clickedid == Inicioserver[8])
  407. {
  408.  
  409. format(String, sizeof(String), ">> %s Resolveu sair do Servidor", Nome(playerid));
  410. SendClientMessageToAll(COR_ADMIN, String);
  411. GameTextForPlayer(playerid, "~", 1000, 6);
  412. }
  413. return 1;
  414. }
  415.  
  416.  
  417. public OnPlayerText(playerid, text[])
  418. {
  419.  
  420. new Msg[128],Name[24],Float:Coords[3];
  421. new id;
  422. GetPlayerPos(playerid,Coords[0],Coords[1],Coords[2]);
  423. GetPlayerName(playerid,Name,sizeof(Name));
  424. format(Msg,sizeof(Msg),"%s : %d %s",Name,id,text);
  425. for(new x = 0 ; x != MAX_PLAYERS; x++) {
  426. if(IsPlayerInRangeOfPoint(x,20.0,Coords[0],Coords[1],Coords[2])) {
  427. SendClientMessage(x,0xD8D8BFAA,Msg);
  428. }
  429. }
  430. return 1;
  431. }
  432.  
  433.  
  434.  
  435.  
  436. /******************************************************************************/
  437. /******************************************************************************/
  438. /******************************************************************************/
  439. /******************************************************************************/
  440. /******************************************************************************/
  441.  
  442. CMD:slap(playerid, params[])
  443. {
  444. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Your not have permission for use command");
  445. new ID, Motivo[46], string[46];
  446. if(sscanf(params, "us", ID, Motivo)) return SendClientMessage(playerid, 0xFFFFFFAA, "use /slap ID Reason");
  447. format(string, sizeof(string), "Your are is slapped [ Reason %s ]", Motivo);
  448. SendClientMessage(ID, 0xFFFFFFAA, string);
  449. new Float:x, Float:Y, Float:Z;
  450. GetPlayerPos(playerid, x, Y, Z);
  451. SetPlayerPos(playerid, x, Y, Z+15);
  452. return 1;
  453. }
  454.  
  455. CMD:kill(playerid, params[])
  456. {
  457. SetPlayerHealth(playerid, 0);
  458. return 1;
  459. }
  460.  
  461.  
  462. /******************************************************************************/
  463. /******************************************************************************/
  464. /******************************************************************************/
  465. /******************************************************************************/
  466. /******************************************************************************/
  467.  
  468. /*=============================================================================
  469.  
  470. FUNCOENS DO SISTEMA DE REGISTRO E LOGIN DO SERVIDOR
  471.  
  472. =============================================================================*/
  473. stock SalvarPlayer(playerid)
  474. {
  475. format(Arquivo, sizeof(Arquivo), "Contas/%s.ini", Nome(playerid));
  476. if(DOF2_FileExists(Arquivo))
  477. {
  478.  
  479. DOF2_SetInt(Arquivo, "Level", Level[playerid]);
  480. Skin[playerid] = GetPlayerSkin(playerid);
  481. DOF2_SetInt(Arquivo, "Dinheiro", GetPlayerMoney(playerid));
  482. DOF2_SaveFile();
  483. }
  484. return 1;
  485. }
  486.  
  487. stock CarregarPlayer(playerid)
  488. {
  489. format(Arquivo, sizeof(Arquivo), "Contas/%s.ini", Nome(playerid));
  490. if(DOF2_FileExists(Arquivo))
  491. {
  492.  
  493. Level[playerid] = DOF2_GetInt(Arquivo, "Level");
  494. Skin[playerid] = DOF2_GetInt(Arquivo, "Skin");
  495. GivePlayerMoney(playerid, DOF2_GetInt(Arquivo, "Dinheiro"));
  496. SetPlayerSkin(playerid, Skin[playerid]);
  497. DOF2_SaveFile();
  498. }
  499. return 1;
  500. }
  501.  
  502. stock IP(playerid)
  503. {
  504. new pIP[26];
  505. GetPlayerIp(playerid, pIP, sizeof(pIP));
  506. return pIP;
  507. }
  508.  
  509. stock Nome(playerid)
  510. {
  511. new ANome[MAX_PLAYER_NAME];
  512. GetPlayerName(playerid, ANome, sizeof(ANome));
  513. return ANome;
  514. }
  515.  
  516. stock AdmNome(playerid)
  517. {
  518. new pid;
  519. Nome[MAX_PLAYER_NAME];
  520. GetPlayerName(pid, ANome, sizeof(ANome));
  521. return Nome;
  522. }
  523.  
  524. stock limparChat(playerid, linhas) {
  525. for(new b = 0; b <= linhas; b++) SendClientMessage(playerid, -1, " ");
  526. }
  527.  
  528. /******************************************************************************/
  529. /******************************************************************************/
  530. /******************************************************************************/
  531. /******************************************************************************/
  532. /******************************************************************************/
Advertisement
Add Comment
Please, Sign In to add comment