[Ajuda] Ajuda vip
#9

Bom a falta de atenзгo foi fatal neste caso.
VIPLevelName nгo e uma variavel de numeros e sim para amarzenamento de celulas.

Tente assim:

PHP код:
COMMAND:darvip(playeridparams[])
{
    new 
OtherPlayerName[24], AdminName[24], Msg[128], OldLevelNewVIPLevel;
    
SendAdminText(playerid"/darvip"params);
    if (
APlayerData[playerid][LoggedIn] == true)
    {
        if (
APlayerData[playerid][PlayerLevel] >= 6)
        {
            if (
sscanf(params"ud"OtherPlayerNewVIPLevel)) SendClientMessage(playerid0xFF0000AA"[USE] \"/darvip <ID> <Nivel VIP>\"");
            else
            {
                if (
IsPlayerConnected(OtherPlayer))
                {
                    
OldLevel APlayerData[OtherPlayer][VIPLevel];
                    
GetPlayerName(playeridAdminNamesizeof(AdminName));
                    
GetPlayerName(OtherPlayerNamesizeof(Name));
                    
APlayerData[OtherPlayer][VIPLevel] = NewVIPLevel;
                    
format(Msg128"Voce ganhou %d por %s (%s)"VIPLevelName[APlayerData[playerid][VIPLevel]], AdminNameAdminLevelName[APlayerData[playerid][PlayerLevel]]);
                    
SendClientMessage(OtherPlayer0x00FF00FFMsg);
                    
format(Msg128"Voce deu %d ao jogador %s"VIPLevelName[APlayerData[playerid][VIPLevel]], Name);
                    
SendClientMessage(playerid0x00FF00FFMsg);
                    
PlayerFile_Save(OtherPlayer);
                    if (
OldLevel != NewVIPLevel)
                    {
                        
format(Msg128"[VIP] O jogador %s foi promovido a vip %s pelo admin %s %s."NameVIPLevelName[APlayerData[playerid][VIPLevel]], AdminNameAdminLevelName[APlayerData[playerid][PlayerLevel]]);
                        
SendClientMessageToAll(0x00FF00FFMsg);
                    }
                    else 
SendClientMessage(playerid0xFF0000FF"O nнvel do jogador nгo foi alterado");
                }
                else 
SendClientMessage(playerid0xFF0000FF"O jogador nao esta online");
            }
        }
    }
    return 
1;
}
COMMAND:vips(playeridparams[])
{
    new 
VIPList[500], Name[24];
    if (
APlayerData[playerid][LoggedIn] == true)
    {
        for (new 
iMAX_PLAYERSi++)
        {
            if (
IsPlayerConnected(i))
            {
                
GetPlayerName(iNamesizeof(Name));
                if (
APlayerData[i][VIPLevel] > 0)
                {
                    
format(VIPList500"%sO %s й Jogador VIP. Nivel vip: %s\n"VIPListNameVIPLevelName[APlayerData[i][VIPLevel]]);
                    continue;
                }
            }
        }
        if (
strlen(VIPList) > 0)
            
ShowPlayerDialog(playeridDialogNoResponseDIALOG_STYLE_LIST"Players Vips Online no LTB:"VIPList"Ok""Cancelar");
        else
            
SendClientMessage(playerid0xFF0000FF"Nenhum Player vip Online");
    }
    return 
1;

Reply


Messages In This Thread
Ajuda vip - by Canema - 09.09.2013, 21:27
Re: Ajuda vip - by smiiir - 09.09.2013, 21:30
Re: Ajuda vip - by Canema - 09.09.2013, 21:35
Re: Ajuda vip - by smiiir - 09.09.2013, 21:35
Re: Ajuda vip - by Canema - 09.09.2013, 21:37
Re: Ajuda vip - by smiiir - 09.09.2013, 21:42
Re: Ajuda vip - by Canema - 09.09.2013, 21:46
Re: Ajuda vip - by smiiir - 09.09.2013, 21:55
Re: Ajuda vip - by Don_Speed - 09.09.2013, 21:57
Re: Ajuda vip - by Canema - 09.09.2013, 21:57

Forum Jump:


Users browsing this thread: 2 Guest(s)