SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 17/11/2013, 07:15 AM   #1
donhu789
Huge Clucker
 
Join Date: Jan 2013
Location: Hell
Posts: 388
Reputation: 1
Default [ZCMD]Vip Online Having Big Problem

pawn Code:
CMD:vips(playerid,params[])
{
    new Count = 0;
    new n[MAX_PLAYER_NAME];
    new string[2000];
    new VipDuty[1000];
//    SendClientMessage(playerid, 0x00FF00FF, "__________|Admins|__________");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(PlayerInfo[i][dRank] < 1) continue;
        GetPlayerName(i,n,sizeof(n));
        switch(PlayerInfo[i][OnDuty])
        {
                case 0: VipDuty = "Playing!";
                case 1: VipDuty = "OnDuty!";
        }
        format(string,sizeof(string),"Level: %d - %s(ID:%d) | %s | %s\n", PlayerInfo[i][dRank], PlayerName2(i), i, GetRankFromAdmin(i), VipDuty);
        Count++;
    }
    if(Count == 0)
    {
        ShowPlayerDialog(playerid, DIALOG_VIPS,DIALOG_STYLE_MSGBOX, "|__|YG Online VIPs List|__|", "No VIPs Online In The List \n VIPs Are Also watching From console And IRC.", "ok", "");
        return 1;
    }
    ShowPlayerDialog(playerid, DIALOG_VIPS,DIALOG_STYLE_MSGBOX, "|__|YG Online VIPs List|__|", string, "ok", "");
    return 1;
}
stock GetRankFromAdmin(playerid)
{
    new VipRank[900];
    switch(PlayerInfo[playerid][dRank])
    {
        case 0:
        {
            VipRank = "Regular Player";
        }
        case 1:
        {
            VipRank = "Silver";
        }
        case 2:
        {
            VipRank = "Gold";
        }
        case 3:
        {
            VipRank = "Premium";
        }
    }
    return VipRank;
}


guys help this is my Vip code is have a error let my explain:


First i set my self to level 3 is work fine
Second i set another level 3 Of Another Player but went i preass /vips is only show my

If That Not A Problem Please Fix my /setvip code


pawn Code:
CMD:setvip(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 10) {
        new tmp4[256], tmp3[256], Index; tmp4 = strtok(params,Index), tmp3 = strtok(params,Index);
        if(isnull(tmp4) || isnull(tmp3) || !IsNumeric2(tmp3)) return SendClientMessage(playerid, red, "USAGE: /setvip [playerid] [Level] | Note : Max Levels = 3 |");
        new player1 = strval(tmp4), skin = strval(tmp3), string[128];
        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
            CMDMessageToAdmins(playerid,"Setvip");
            format(string, sizeof(string), "You have set \"%s's\" Vip Level to '%d", pName(player1), skin); SendClientMessage(playerid,blue,string);
            if(player1 != playerid) { format(string,sizeof(string),"Manager \"%s\" has set your Vip Level to '%d'", pName(playerid), skin); SendClientMessage(player1,blue,string); }
            return PlayerInfo[player1][dRank] = skin;
        } else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
    } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}


I show you both code now please help REP REP REP
donhu789 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tool/Web/Other] (online/beta) zcmd 2 icmd - conversor de comandos ipsBruno Lanšamentos/Releases 31 18/10/2013 11:09 PM
Problem with getting SA-MP server online Hillo General 15 22/12/2012 04:50 PM
Problem While online... Ashleh88 Client Support 0 17/01/2010 01:51 PM
Help please online problem Hapo Server Support 1 08/05/2009 07:01 PM


All times are GMT. The time now is 05:05 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.