[Pedido] Comando de comprarvip
#1

Eae gente do fуrum, venho pedir a vocкs que me ajudem a fazer esse comando:

o player digita /comprarvip1, e seta vip nivel 1 para ele durante 1 mкs por 10kk de gold.

ou o player digita /comprarvip2, e seta vip nivel 2 para ele durante 1 mкs por 15kk de gold.

ou o player digita /comprarvip3, e seta vip sуcio para ele durante 1 mкs por 20kk de gold.

mas nгo sei como fazer para setar o vip ao player.

me ajudem?

aqui meu comando de /darvip para me ajudarem:

PHP код:
       }
    if(
strcmp(cmd"/darvip"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
PlayerInfo[playerid][pAdmin] < 10)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo tem autorizaзгo para usar esse comando.");
                return 
1;
            }
            
VipVaga();
            if(
VagaSobrando == 0)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Nгo hб mais vagas na lista use /limparvip primeiro.");
                return 
1;
            }
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /darvip [id] [Nivel] [Quantidade de Meses]");
                return 
1;
            }
            new 
para1;
            new 
level;
            new 
mesesvip;
            
para1 ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /darvip [id] [Nivel] [Quantidade de Meses]");
                return 
1;
            }
            
level strval(tmp);
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /darvip [id] [Nivel] [Quantidade de Meses]");
                return 
1;
            }
            
mesesvip strval(tmp);
            
GetPlayerName(para1giveplayersizeof(giveplayer));
            
GetPlayerName(playeridsendernamesizeof(sendername));
            if(
IsPlayerConnected(para1))
            {
                if(
para1 != INVALID_PLAYER_ID)
                {
                    
format(stringsizeof string"Vocк deu VIP Nнvel %d para %s"levelgiveplayer);
                    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                    
getdate(yearmonthday);
                    
gettime(hour,minute,second);
                    
PlayerInfo[para1][pVip] = level;
                    new 
var03 0;
                    new 
Anov,Mesv,Diav;
                    
getdate(AnovMesvDiav);
                    
BenefVips(level);
                    if(
Diav == 31Diav 30 ;
                    if(
Mesv == 12 && Anov == 2017) { Mesv 1Anov++;} else { Mesv++; }
                    if(
level == 1)
                    {
                        
PlayerPlaySound(para110840.00.00.0);
                        
SendClientMessage(para10x06DEE2AA,"{06DEE2}Liberaзгo de Vantagens Vips");
                        
format(stringsizeof string"Vocк ganhou VIP Normal Nнvel %d do admin %s"levelsendername);
                        
SendClientMessage(para10xFFFFFFFFstring);
                        
PlayerInfo[para1][pConta] += VipGrana;
                        
PlayerInfo[playerid][pVip] = 1;
                        
format(gstringsizeof(gstring), "** Foi Acrescentado + 1 respeito por Payday, e um Salario maior!!");
                        
SendClientMessage(para10xFFFFFFFFgstring);
                        
format(gstringsizeof(gstring), "**Vocк Recebeu R$ %d na conta do Banco!"VipGrana);
                        
SendClientMessage(para10xFFFFFFFFgstring);
                        
format(gstringsizeof(gstring), "** Mais informaзхes Visite: www.semforum.forumeiros.com");
                        
SendClientMessage(para10xFFFFFFFFgstring);
                        
SendClientMessage(para10xBBFFBBFF,"** Conta Vip Normal Ativada, Obrigado por nos Ajudar, Bom Jogo!");
                    }
                    else if(
level == 2)
                    {
                        
PlayerPlaySound(para110840.00.00.0);
                        
SendClientMessage(para10x06DEE2AA,"{06DEE2}Liberaзгo de Vantagens Vips");
                        
PlayerInfo[para1][pConta] += VipGrana;
                        
PlayerInfo[playerid][pVip] = 2;
                        
format(stringsizeof string"Vocк recebeu SUPR-VIP Nнvel %d do admin %s"levelsendername);
                        
SendClientMessage(para10xFFFFFFFFstring);
                        
format(gstringsizeof(gstring), "** Vocк Recebeu R$ %d na conta do Banco!"VipGrana);
                        
SendClientMessage(para10xFFFFFFFFgstring);
                        
format(gstringsizeof(gstring), "** Foi Acrescentado + 3 respeito por Payday, e um Salario maior!!");
                        
SendClientMessage(para10xFFFFFFFFgstring);
                        
format(gstringsizeof(gstring), "** Sua primeira Fatura do Vip Vence Dia %d/%d/%d, Meses Pagos: %d!"Diav,Mesv,Anov,mesesvip);
                        
SendClientMessage(para10xFFFFFFFFgstring);
                        
format(gstringsizeof(gstring), "** Mais informaзхes Visite: www.semforum.forumeiros.com");
                        
SendClientMessage(para10xFFFFFFFFgstring);
                        
SendClientMessage(para10xBBFFBBFF,"** Conta SUPER-Vip Ativada, Obrigado por nos Ajudar, Bom Jogo!");
                    }
                    else if(
level == 3)
                    {
                        
PlayerPlaySound(para110840.00.00.0);
                        
SendClientMessage(para10x06DEE2AA,"{06DEE2}Liberaзгo de Vantagens Vips");
                        
PlayerInfo[para1][pConta] += VipGrana;
                        
format(stringsizeof string"Vocк ganhou VIP Sуcio Nнvel %d do admin %s"levelsendername);
                        
SendClientMessage(para10xFFFFFFFFstring);
                        
format(gstringsizeof(gstring), "** Vocк Recebeu R$ %d na conta do Banco!"VipGrana);
                        
SendClientMessage(para10xFFFFFFFFgstring);
                        
format(gstringsizeof(gstring), "** Foi Acrescentado + 5 respeito por Payday, e um Salario maior!!");
                        
SendClientMessage(para10xFFFFFFFFgstring);
                        
format(gstringsizeof(gstring), "** Sua primeira Fatura do Vip Vence Dia %d/%d/%d, Meses Pagos: %d!"Diav,Mesv,Anov,mesesvip);
                        
SendClientMessage(para10xFFFFFFFFgstring);
                        
format(gstringsizeof(gstring), "** Mais informaзхes Visite: www.semforum.forumeiros.com");
                        
SendClientMessage(para10xFFFFFFFFgstring);
                        
SendClientMessage(para10xBBFFBBFF,"** Conta Vip Sуcio Ativada, Obrigado por nos Ajudar, Bom Jogo!");
                    }
                    
ScoreLevel(para1);
                    for(new 
0sizeof(VipInfo); i++)
                    {
                        if(
strcmp(PlayerName(para1),VipInfo[i][vNick],true)==0)
                        {
                            
VipInfo[i][vDia] = Diav;
                            
VipInfo[i][vMes] = Mesv;
                            
VipInfo[i][vAno] = Anov;
                            
VipInfo[i][vMesesVIP] = mesesvip;
                            
SaveVip();
                            
var03 1;
                            break;
                        }
                    }
                    if(
var03 == 0)
                    {
                        for(new 
0sizeof(VipInfo); i++)
                        {
                            if(
strcmp("Ninguem",VipInfo[i][vNick],true)==0)
                            {
                                
strmid(VipInfo[i][vNick], PlayerName(para1), 0strlen(PlayerName(para1)), 255);
                                
VipInfo[i][vDia] = Diav;
                                
VipInfo[i][vMes] = Mesv;
                                
VipInfo[i][vAno] = Anov;
                                
VipInfo[i][vMesesVIP] = mesesvip;
                                break;
                            }
                        }
                    }
                    
PlayerInfo[para1][pMesesVIP] = mesesvip;
                    
SalvarPlayer(para1);
                    
SaveVip();
                }
            }
        }
        return 
1;
    } 
Se me ajudarem com uma base jб estarei satisfeito, mas me ajudem pfvr
Reply
#2

PHP код:
#define COMPRARVIP 
PHP код:
CMD:comprarvip(playerid)
{
    
ShowPlayerDialog(playeridCOMPRARVIPDIALOG_STYLE_LIST"Loja VIP","Vip Normal\nSuper Vip\nVip Sуcio\n");
    return 
1;

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == COMPRARVIP)
    {
        if(!
response) return SendClientMessage(playerid,-1,"Compra Cancelada gay");
        {
            if(
listitem == 0)
            {
                if(
PlayerInfo[playerid][pVip] == 1) return SendClientMessage(playerid,-1,"Vocк ja й vip, espere acabar fdp");
                
                
PlayerPlaySound(para110840.00.00.0);
                
SendClientMessage(para10x06DEE2AA,"{06DEE2}Liberaзгo de Vantagens Vips");
                
format(stringsizeof string"Vocк comprou VIP nнvel %d"level);
                
SendClientMessage(para10xFFFFFFFFstring);
                
PlayerInfo[para1][pConta] += VipGrana;
                
PlayerInfo[playerid][pVip] = 1;
            }
            if(
listitem == 1)
            {
                
// Continua ai ;-;
            
}
            if(
listitem == 2)
            {
                
//continua ai ;-;
            
}
        }
    }
    return 
1;

Reply
#3

Quote:
Originally Posted by Relaxed
Посмотреть сообщение
PHP код:
#define COMPRARVIP 
PHP код:
CMD:comprarvip(playerid)
{
    
ShowPlayerDialog(playeridCOMPRARVIPDIALOG_STYLE_LIST"Loja VIP","Vip Normal\nSuper Vip\nVip Sуcio\n");
    return 
1;

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == COMPRARVIP)
    {
        if(!
response) return SendClientMessage(playerid,-1,"Compra Cancelada gay");
        {
            if(
listitem == 0)
            {
                if(
PlayerInfo[playerid][pVip] == 1) return SendClientMessage(playerid,-1,"Vocк ja й vip, espere acabar fdp");
                
                
PlayerPlaySound(para110840.00.00.0);
                
SendClientMessage(para10x06DEE2AA,"{06DEE2}Liberaзгo de Vantagens Vips");
                
format(stringsizeof string"Vocк comprou VIP nнvel %d"level);
                
SendClientMessage(para10xFFFFFFFFstring);
                
PlayerInfo[para1][pConta] += VipGrana;
                
PlayerInfo[playerid][pVip] = 1;
            }
            if(
listitem == 1)
            {
                
// Continua ai ;-;
            
}
            if(
listitem == 2)
            {
                
//continua ai ;-;
            
}
        }
    }
    return 
1;

Nem compila, da pawn parou de funcionar!

me ajude
Reply
#4

Ele so fez uma base, lуgico que nгo vai funcionar..
Reply
#5

Franklin0180 o comando que vocк mostrou aн jб faz isso que vocк ta querendo.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)