Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd,"/setarvip", true)==0) {
- new ID, dias;
- if(!IsPlayerAdmin(playerid))
- return SendClientMessage(playerid, VERMELHO, "| ERRO | Comando inválido!");
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, Vermelho, "| ERRO | Digite: /SetarVip [ID] [DIAS]");
- return 1;
- }
- ID = strval(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, Vermelho, "| ERRO | Digite: /SetarVip [ID] [DIAS]");
- return 1;
- }
- dias = strval(tmp);
- if(dias < -1 || dias > 999) {
- SendClientMessage(playerid, Vermelho, "| ERRO | Quantidade inválida!");
- return 1;
- }
- if( IsPlayerConnected(ID) ) {
- if(dias > 30)
- return SendClientMessage(playerid, VERMELHO, "| ERRO | Você não pode dar mais que 30 dias de VIP!");
- SetarV(ID, dias);
- SendClientFormat(playerid, AZUL_BEST, "| VIP | Você setou %d de VIP para o(a) jogador(a) %s[%d]", dias, PlayerName(ID), ID);
- SendClientFormat(ID, VERMELHO, "| VIP | O(A) Adm %s setou %d dias de VIP para você!", PlayerName(playerid), dias);
- SendClientMessage(ID, AZUL_BEST, "| VIP | Para saber os comandos VIP use /ComandosVIP !");
- return 1;
- }
- else {
- SendClientMessage(playerid, VERMELHO, "| ERRO | Jogador não conectado!");
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment