[Ajuda] Converter comando.
#6

Quote:
Originally Posted by NuTShoT
Посмотреть сообщение
Olб, bom dia!

Apos a conversгo o comando parou de funcionar. Alguйm poderia me ajudar ?!

Vlw!
Vocк estб colocando esse codigo dentro dessa CallBack ao menos ? OnPlayerCommandText?

Se nгo:

PHP код:
public OnPlayerCommandText(playeridcmdtext[]) {
if(
strcmp(cmd"/meuvip"true) == 0)
{
    
GetPlayerName(playerid,Nome,sizeof(Nome));
    
format(Falao,sizeof(Falao),"Vips/%s.ini",Nome);
    if(
dini_Exists(Falao))
    {
        new 
Falao2[140];
        new 
Hoje getdate();
        new 
Vencimento dini_Int(Falao,"Vencimento");
        
format(Falao2,sizeof(Falao2),"Olб %s!\n\nO admin cujo setou seu VIP, setou %d dias.\n\nE vocк Jб usou %d dias com o mesmo!\n\nAproveite antes que acabe!",Nome,dini_Int(Falao,"Dias"),Hoje-Vencimento);
        
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Seu VIP",Falao2,"Cancelar","");
    }
    return 
1;
}
if(
strcmp(cmd"/darvip"true) == 0)
{
    if(
IsPlayerAdmin(playerid))
    {
        new 
ID;
        new 
Dias;
        if(!
sscanf(cmdtext,"ud",ID,Dias))
        {
            
SendClientMessage(playerid,0xBFBFBFAA,"Use: /darvip ID Dias.");
            return 
1;
        }
        if(!
IsPlayerConnected(ID))
        {
            
SendClientMessage(playerid,0xBFBFBFAA,"Player nгo online.");
            return 
1;
        }
        else
        {
            if(
VIP[ID] == 1)
            {
                
SendClientMessage(playerid,0xBFBFBFAA,"O mesmo Jб й VIP.");
                return 
1;
            }
            else
            {
                
GetPlayerName(ID,Nome,sizeof(Nome));
                
format(Falao,sizeof(Falao),"Vips/%s.ini",Nome);
                
dini_Create(Falao);
                
dini_IntSet(Falao,"Vencimento",getdate());
                
dini_IntSet(Falao,"Dias",Dias);
                
VIP[ID] = 1;
                
format(Falao,sizeof(Falao),"O administrador deu VIP para o player %s por %d dias.",Nome,Dias);
                
SendClientMessageToAll(0xFF8080AA,Falao);
            }
        }
    }
    return 
1;
}
if(
strcmp(cmd"/removervip"true) == 0)
{
    if(
IsPlayerAdmin(playerid))
    {
        new 
ID;
        if(!
sscanf(cmdtext,"u",ID))
        {
            
SendClientMessage(playerid,0xBFBFBFAA,"Use: /removervip ID.");
            return 
1;
        }
        if(!
IsPlayerConnected(ID))
        {
            
SendClientMessage(playerid,0xBFBFBFAA,"Player nгo online.");
            return 
1;
        }
        else
        {
            if(
VIP[ID] == 0)
            {
                
SendClientMessage(playerid,0xBFBFBFAA,"O mesmo nгo й VIP.");
                return 
1;
            }
            else
            {
                
GetPlayerName(ID,Nome,sizeof(Nome));
                
format(Falao,sizeof(Falao),"Vips/%s.ini",Nome);
                
dini_Remove(Falao);
                
VIP[ID] = 0;
                
format(Falao,sizeof(Falao),"O administrador removeu o VIP do player %s.",Nome);
                
SendClientMessageToAll(0xFF8080AA,Falao);
            }
        }
    }
    return 
1;
}

Reply


Messages In This Thread
Converter comando. - by NuTShoT - 07.07.2013, 12:52
Re: Converter comando. - by FelipeAMC - 07.07.2013, 13:32
Re: Converter comando. - by NuTShoT - 07.07.2013, 13:39
Re: Converter comando. - by PT - 07.07.2013, 14:06
Re: Converter comando. - by NuTShoT - 09.07.2013, 17:21
Re: Converter comando. - by Aleex_Mason - 09.07.2013, 17:37
Re: Converter comando. - by NuTShoT - 09.07.2013, 17:54
Re: Converter comando. - by TheKoDaK - 09.07.2013, 19:16
Re: Converter comando. - by NuTShoT - 09.07.2013, 19:18

Forum Jump:


Users browsing this thread: 1 Guest(s)