[DCMD]Vip Dialog Online Helping -
donhu789 - 11.11.2013
pawn Код:
dcmd_viplist(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][LoggedIn] == 1)
{
new bool:First2 = false;
new Count, i;
new string[128];
new adminname[MAX_PLAYER_NAME];
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
Count++;
if(Count == 0)
return SendClientMessage(playerid,red, "No players have VIP Account!");
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
{
if(AccInfo[i][pVip] > 0)
{
switch(AccInfo[i][pVip])
{
case 1: AccType = "Silver";
case 2: AccType = "Gold";
case 3: AccType = "Premium";
}
}
GetPlayerName(i, adminname, sizeof(adminname));
if(!First2)
{
format(string, sizeof(string), "VIP Players: %d(%s)", i,AccType);
First2 = true;
}
else format(string,sizeof(string),"%s, %d(%s)",string,i,AccType);
}
return SendClientMessage(playerid,yellow,string);
}
else return WARNINGMessages(playerid, 1);
}
Guys please help !!! I need To make This Thing turn To Dialog Could you guys help ?
Help please +REP +REP | can anyone ReP my 1 To I can Rep Others?
Re: [DCMD]Vip Dialog Online Helping -
SAMProductions - 11.11.2013
Try This :-
Definition,
Код:
#define DIALOG_VIPS 32622
Command's Code,
pawn Код:
dcmd_viplist(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][LoggedIn] == 1)
{
new bool:First2 = false;
new Count, i;
new string[128];
new adminname[MAX_PLAYER_NAME];
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
Count++;
if(Count == 0)
return ShowPlayerDialog(playerid, DIALOG_VIPS, DIALOG_STYLE_MSGBOX, "{FF0000}<!> {EEEEEE}Online VIP(s):", "{FF0000}There is No Player that has VIP Level / Account !", "OK", "");
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
{
if(AccInfo[i][pVip] > 0)
{
switch(AccInfo[i][pVip])
{
case 1: AccType = "Silver";
case 2: AccType = "Gold";
case 3: AccType = "Premium";
}
}
GetPlayerName(i, adminname, sizeof(adminname));
if(!First2)
{
format(string, sizeof(string), "VIP Players: %d(%s)", i,AccType);
First2 = true;
}
else format(string,sizeof(string),"%s, %d(%s)",string,i,AccType);
}
return ShowPlayerDialog(playerid, DIALOG_VIPS, DIALOG_STYLE_MSGBOX, "{FF0000}<!> {EEEEEE}Online VIP(s):", string, "OK", "");
}
else return WARNINGMessages(playerid, 1);
}
or This :-
pawn Код:
dcmd_viplist(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][LoggedIn] == 1)
{
new bool:First2 = false;
new Count, i;
new string[128];
new adminname[MAX_PLAYER_NAME];
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
Count++;
if(Count == 0)
return ShowPlayerDialog(playerid, DIALOG_VIPS, DIALOG_STYLE_MSGBOX, "{FF0000}<!> {EEEEEE}Online VIP(s):", "{FF0000}There is No Player that has VIP Level / Account !", "OK", "");
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
{
if(AccInfo[i][pVip] > 0)
{
switch(AccInfo[i][pVip])
{
case 1: AccType = "Silver";
case 2: AccType = "Gold";
case 3: AccType = "Premium";
}
}
GetPlayerName(i, adminname, sizeof(adminname));
if(!First2)
{
format(string, sizeof(string), "VIP Players: %d(%s)", i,AccType);
ShowPlayerDialog(playerid, DIALOG_VIPS, DIALOG_STYLE_MSGBOX, "{FF0000}<!> {EEEEEE}Online VIP(s):", string, "OK", "");
First2 = true;
}
else format(string,sizeof(string),"%s, %d(%s)",string,i,AccType);
ShowPlayerDialog(playerid, DIALOG_VIPS, DIALOG_STYLE_MSGBOX, "{FF0000}<!> {EEEEEE}Online VIP(s):", string, "OK", "");
}
}
else return WARNINGMessages(playerid, 1);
}
Re: [DCMD]Vip Dialog Online Helping -
donhu789 - 11.11.2013
thanks AGain SAMPProdutions
You always helped my You Are A Greet scripter (y) sorry cant rep you
![Sad](images/smilies/sad.gif)
becuz my rep -1