[ZCMD]Vip Online Having Big Problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [ZCMD]Vip Online Having Big Problem (
/showthread.php?tid=476200)
[ZCMD]Vip Online Having Big Problem -
donhu789 - 17.11.2013
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