Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. if(strcmp(cmd, "/alterarnick", true) == 0)
  2. {
  3. tmp = strtok(cmdtext, idx);
  4. if(!strlen(tmp))
  5. {
  6. SendClientMessage(playerid, BRANCO, "USE: /alterarnick [novo nick]");
  7. return 1;
  8. }
  9. if(LiberadoNick[playerid] == 1)
  10. {
  11. new conta[120], casa[120], Senha[256], Senha_Padrao[256], Data_Registro[256], novo[256];
  12. format(conta, sizeof(conta), CONTA, nome(playerid));
  13. format(casa, sizeof(casa), CASA, CasaID[playerid]);
  14. format(novo, sizeof(novo), CONTA, tmp);
  15. if(dini_Exists(novo)){
  16. SendClientMessage(playerid, ROXO,"(ERRO) Este nick já existe!");
  17. } else {
  18. Senha = dini_Get(conta, "Senha");
  19. Senha_Padrao = dini_Get(conta, "Senha_Padrao");
  20. Data_Registro = dini_Get(conta, "Data_Registro");
  21. format(string, sizeof(string), "(ADM-BOT) O jogador %s alterou seu nick para '%s'!", nome(playerid), tmp); SendClientMessageToAll(CORADMIN, string);
  22. SetPlayerName(playerid, tmp);
  23. dini_Remove(conta);
  24. dini_Create(novo);
  25. dini_Set(novo, "Senha", Senha);
  26. dini_Set(novo, "Senha_Padrao", Senha_Padrao);
  27. dini_Set(novo, "Data_registro", Data_Registro);
  28. dini_Set(casa, "Dono", tmp);
  29. SalvarConta(playerid);
  30. cInfo[CasaID[playerid]][NovoVeiculo]=1;
  31. return 1;
  32. }
  33. } else {
  34. SendClientMessage(playerid, ROXO,"(ERRO) Você não tem permissão para alterar seu nick!");
  35. }
  36. return 1;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement