[HELP]: /Vips command.
#1

Hello.
I've just made a /vips command, wich will show online vips.
But there's a bug/issue, I can't find.
Everytime I do command: /vips, if there's 0 online players I doesn't receive ERROR message, and it shows me as Special VIP, level 3, even if i'm not vip.

pawn Код:
CMD:vips(playerid, params[])
{
    new vips[50], name[MAX_PLAYER_NAME], count;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(VipInfo[i][Vip] >= 1)
            {
                count++;
                if(count == 0) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu este online niciun {15FF00}VIP.");
                GetPlayerName(i, name, sizeof(name));
                format(vips, sizeof(vips), "{FF9900}[%s]: {FF0000}%s {15FF00}(%d)\n", GetPlayerVip(i), name, VipInfo[i][Vip]);
                ShowPlayerDialog(playerid, DIALOG_VIP, DIALOG_STYLE_MSGBOX, "{FFFFFF}Vipi online:", vips, "Iesi", "");
            }
        }
    }
    return 1;
}
If there's can be a problem with my GetPlayerVip command, then here you go:

pawn Код:
stock GetPlayerVip(playerid)
{
    new vrank[40];
    switch(VipInfo[playerid][Vip])
    {
        case 3: vrank = "Special VIP";
        case 2: vrank = "Gold VIP";
        case 1: vrank = "Silver VIP";
        default: vrank = "NONE";
    }
    return vrank;
}
Cheers,
+Rep for helper!
Reply


Messages In This Thread
[HELP]: /Vips command. - by HY - 17.02.2015, 16:37
Re: [HELP]: /Vips command. - by ZombieNest - 17.02.2015, 16:39
Re: [HELP]: /Vips command. - by HazardouS - 17.02.2015, 16:41
Re: [HELP]: /Vips command. - by HY - 17.02.2015, 16:49
Re: [HELP]: /Vips command. - by DavidBilla - 17.02.2015, 18:06
Re: [HELP]: /Vips command. - by HY - 17.02.2015, 18:42

Forum Jump:


Users browsing this thread: 1 Guest(s)