Lucas_Script

Setar VIP CD

Oct 28th, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. if(strcmp(cmd,"/setarvip", true)==0) {
  2. new ID, dias;
  3.  
  4. if(!IsPlayerAdmin(playerid))
  5. return SendClientMessage(playerid, VERMELHO, "| ERRO | Comando inválido!");
  6.  
  7. tmp = strtok(cmdtext, idx);
  8. if(!strlen(tmp)) {
  9. SendClientMessage(playerid, Vermelho, "| ERRO | Digite: /SetarVip [ID] [DIAS]");
  10. return 1;
  11. }
  12. ID = strval(tmp);
  13. tmp = strtok(cmdtext, idx);
  14. if(!strlen(tmp)) {
  15. SendClientMessage(playerid, Vermelho, "| ERRO | Digite: /SetarVip [ID] [DIAS]");
  16. return 1;
  17. }
  18. dias = strval(tmp);
  19. if(dias < -1 || dias > 999) {
  20. SendClientMessage(playerid, Vermelho, "| ERRO | Quantidade inválida!");
  21. return 1;
  22. }
  23.  
  24. if( IsPlayerConnected(ID) ) {
  25.  
  26. if(dias > 30)
  27. return SendClientMessage(playerid, VERMELHO, "| ERRO | Você não pode dar mais que 30 dias de VIP!");
  28.  
  29. SetarV(ID, dias);
  30. SendClientFormat(playerid, AZUL_BEST, "| VIP | Você setou %d de VIP para o(a) jogador(a) %s[%d]", dias, PlayerName(ID), ID);
  31. SendClientFormat(ID, VERMELHO, "| VIP | O(A) Adm %s setou %d dias de VIP para você!", PlayerName(playerid), dias);
  32. SendClientMessage(ID, AZUL_BEST, "| VIP | Para saber os comandos VIP use /ComandosVIP !");
  33. return 1;
  34. }
  35. else {
  36.  
  37. SendClientMessage(playerid, VERMELHO, "| ERRO | Jogador não conectado!");
  38. return 1;
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment