VIP List Help
#1

I made this command >
PHP код:
CMD:vips(playeridparams[])
{
    
SendClientMessage(playeridgreen" ");
    
SendClientMessage(playeridgreen"___________ |- Online VIPs -| ___________");
    
SendClientMessage(playeridgreen" ");
    new 
count 0;
    for(new 
0MAX_PLAYERSi++)
    {
        if(!
IsPlayerConnected(i)) continue;
        if(!
PlayerInfo[i][VIP]) continue;
        new 
string[90], playersname[MAX_PLAYER_NAME];
        
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(31447) : error 017: undefined symbol "string"
H:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(31450) : error 010: invalid function or declaration
H:\GAME\SA-MP Server\HGTDM~RP\Gamemodes\HGTDM~RP.pwn(31452) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Please Help Me To Solve This Problem...
Thanks And God Bless You All
Reply
#2

Specify the lines man gzz
Reply
#3

Please Give Me The Right Codes
Reply
#4

Did you actually read what I told you the last time?
http://forum.sa-mp.com/showthread.ph...01#post3714001

"never create arrays and variables inside loops"

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

OK, 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


Forum Jump:


Users browsing this thread: 1 Guest(s)