VIP help
#17

Why do you add this:
pawn Код:
{
    if(IsPlayerConnected(playerid))
    {
        {
            return 1;
        }
    }
    return 0;
That's not needed like I said. That function I said whas the complete function. Do NOT add it in a command or something. Here's an example gamemode:

pawn Код:
#include <a_samp>
#include <zcmd>

enum pInfo
{
    pDonateRank
};
new PlayerInfo[MAX_PLAYERS][pInfo];

main()
    return 1;

public OnGameModeInit()
    return 1;

stock IsAVip(playerid, reqlvl = 1)
    return PlayerInfo[playerid][pDonateRank] >= reqlvl ? true : false;

CMD:vip(playerid, params[])
{
    if(IsAVip(playerid))
        SendClientMessage(playerid, 0xFFFFFFAA, "You are a VIP!");
    else if(IsAVip(playerid, 2))
        SendClientMessage(playerid, 0x00FF00AA, "You are a VIP level 2!");
    else if(IsAVip(playerid, 3))
        SendClientMessage(playerid, 0x00FF00AA, "** You are a VIP level 3!");
   
    if(!IsAVip(playerid))
        SendClientMessage(playerid, 0xFF0000AA, "You are not a VIP");
    return 1;
}
Reply


Messages In This Thread
Fixed - by Ifreezesir - 12.03.2011, 14:34
Re: VIP help - by Kwarde - 12.03.2011, 14:36
Re: VIP help - by Ifreezesir - 12.03.2011, 14:48
Re: VIP help - by Ifreezesir - 12.03.2011, 15:17
Re: VIP help - by Ifreezesir - 12.03.2011, 15:41
Re: VIP help - by Ifreezesir - 12.03.2011, 16:04
Re: VIP help - by Markx - 12.03.2011, 16:09
Re: VIP help - by Kwarde - 12.03.2011, 16:10
Re: VIP help - by Ifreezesir - 12.03.2011, 16:29
Re: VIP help - by Ifreezesir - 12.03.2011, 16:36
Re: VIP help - by Ifreezesir - 12.03.2011, 16:39
Re: VIP help - by Kwarde - 12.03.2011, 17:14
Re: VIP help - by Ifreezesir - 12.03.2011, 17:18
Re: VIP help - by Kwarde - 12.03.2011, 17:22
Re: VIP help - by Ifreezesir - 12.03.2011, 17:37
Re: VIP help - by Ifreezesir - 12.03.2011, 17:57
Re: VIP help - by Kwarde - 12.03.2011, 19:56

Forum Jump:


Users browsing this thread: 3 Guest(s)