Help Me Please
#1

I made this command >
PHP код:
CMD:vips(playeridparams[]) 

    
SendClientMessage(playeridgreen" "); 
    
SendClientMessage(playeridgreen"___________ |- Online VIPs -| ___________"); 
    
SendClientMessage(playeridgreen" "); 
    new 
        
string[90], 
        
playersname[MAX_PLAYER_NAME], 
        
count 0
    for (new 
0MAX_PLAYERSi++) 
    { 
        if(!
IsPlayerConnected(i)) continue; 
        if(!
PlayerInfo[i][VIP]) continue; 
        
GetPlayerName(iplayersnamesizeof(playersname)); 
            switch(
PlayerInfo[i][VIP]) 
            { 
                case 
1format(stringsizeof(string), "{993300}%s (ID:%i) - VIP Level: %d | Bronze VIP"playersnameiPlayerInfo[i][VIP]); 
                case 
2format(stringsizeof(string), "{C0C0C0}%s (ID:%i) - VIP Level: %d | Silver VIP"playersnameiPlayerInfo[i][VIP]); 
                case 
3format(stringsizeof(string), "{CCFFDD}%s (ID:%i) - VIP Level: %d | Gold VIP"playersnameiPlayerInfo[i][VIP]); 
                case 
4format(stringsizeof(string), "{33CCFF}%s (ID:%i) - VIP Level: %d | Diamond VIP"playersnameiPlayerInfo[i][VIP]); 
                default: continue; 
            } 
        } 
        
SendClientMessage(playeridredstring); 
        
count++; 
    } 
    if(!
countSendClientMessage(playeridred"No VIP online in the list"); 
    
SendClientMessage(playeridgreen"______________________________________"); 
    return 
1

And I found this Error >
Код:
H:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(31453) : error 010: invalid function or declaration
H:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(31455) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

Try this i hope it works
Quote:

CMD:vips(playerid, params[])
{
#pragma unused params
new
count = 0,
string[800];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][dRank] >= 1)
{
format(string, 500, "%s %s [ID:%i] | DonorLevel: %d\n", string, PlayerName2(i), i, PlayerInfo[i][dRank]);
//We are appending the string, so put %s before any new data is added,
//and that parameter actually refers to the string itself.
count++;
}
}
}
if (count == 0) ShowPlayerDialog(playerid, 800, DIALOG_STYLE_MSGBOX, "{F81414}=Online Donators=", "{00FFEE}No Donators Online\n{00FF00}_____", "Close", "");
else ShowPlayerDialog(playerid, 800, DIALOG_STYLE_MSGBOX, "{F81414}=Online Donators=", string, "Close", "");
return 1;
}

Reply
#3

Or you can try this i hope it works and give me reputation
Код:
CMD:vips(playerid, params[])
{
    SendClientMessage(playerid, green, " ");
    SendClientMessage(playerid, green, "___________ |- Online VIPs -| ___________");
    SendClientMessage(playerid, green, " ");
    new
        string[90],
        playersname[MAX_PLAYER_NAME],
        count = 0;
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        {
        if(!PlayerInfo[i][VIP]) continue;
        {
GetPlayerName(i, playersname, sizeof(playersname));
            switch(PlayerInfo[i][VIP])
            {
                case 1: format(string, sizeof(string), "{993300}%s (ID:%i) - VIP Level: %d | Bronze VIP", playersname, i, PlayerInfo[i][VIP]);
                case 2: format(string, sizeof(string), "{C0C0C0}%s (ID:%i) - VIP Level: %d | Silver VIP", playersname, i, PlayerInfo[i][VIP]);
                case 3: format(string, sizeof(string), "{CCFFDD}%s (ID:%i) - VIP Level: %d | Gold VIP", playersname, i, PlayerInfo[i][VIP]);
                case 4: format(string, sizeof(string), "{33CCFF}%s (ID:%i) - VIP Level: %d | Diamond VIP", playersname, i, PlayerInfo[i][VIP]);
                default: continue;
            }
        }
        SendClientMessage(playerid, red, string);
        count++;
    }
    if(!count) SendClientMessage(playerid, red, "No VIP online in the list");
    {
    SendClientMessage(playerid, green, "______________________________________");
    return 1;
}
Reply
#4

You shouldn't have made another thread...

Quote:

And isn't it clear? Don't you think there's an extra bracket under default?

Look again, but this time I'll highlight it.
Код:
CMD:vips(playerid, params[])
{
    SendClientMessage(playerid, green, " ");
    SendClientMessage(playerid, green, "___________ |- Online VIPs -| ___________");
    SendClientMessage(playerid, green, " ");
    new
        string[90],
        playersname[MAX_PLAYER_NAME],
        count = 0;
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(!PlayerInfo[i][VIP]) continue;
        GetPlayerName(i, playersname, sizeof(playersname));
        switch(PlayerInfo[i][VIP])
        {
            case 1: format(string, sizeof(string), "{993300}%s (ID:%i) - VIP Level: %d | Bronze VIP", playersname, i, PlayerInfo[i][VIP]);
            case 2: format(string, sizeof(string), "{C0C0C0}%s (ID:%i) - VIP Level: %d | Silver VIP", playersname, i, PlayerInfo[i][VIP]);
            case 3: format(string, sizeof(string), "{CCFFDD}%s (ID:%i) - VIP Level: %d | Gold VIP", playersname, i, PlayerInfo[i][VIP]);
            case 4: format(string, sizeof(string), "{33CCFF}%s (ID:%i) - VIP Level: %d | Diamond VIP", playersname, i, PlayerInfo[i][VIP]);
            default: continue;
            }
        }
        SendClientMessage(playerid, red, string);
        count++;
    }
    if(!count) SendClientMessage(playerid, red, "No VIP online in the list");
    SendClientMessage(playerid, green, "______________________________________");
    return 1;
}
Reply
#5

It make no affect
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)