17.04.2013, 13:53
Hello!
I maked a /vips command, which show a player all online vips, but if there are two vips online and then you do /vips, then it's only shows a one vip player, not both of them....Can someone fix that?
Code:
Thanks
I maked a /vips command, which show a player all online vips, but if there are two vips online and then you do /vips, then it's only shows a one vip player, not both of them....Can someone fix that?
Code:
PHP код:
CMD:vips(playerid, params[])
{
new count = 0, string[256];
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
if(gPlayerInfo[i][PLAYER_VIP] == 1)
{
format(string, sizeof(string),"Vip Level 1:{B3754D} %s [BRONZE]", PlayerName(i));
ShowPlayerDialog(playerid, 117, DIALOG_STYLE_MSGBOX, "{09F709}Online Vips:", string, "Ok", "");
count++;
}
if(gPlayerInfo[i][PLAYER_VIP] == 2)
{
format(string, sizeof(string),"Vip Level 2:{BBBBBB} %s [SILVER]", PlayerName(i));
ShowPlayerDialog(playerid, 117, DIALOG_STYLE_MSGBOX, "{09F709}Online Vips:", string, "Ok", "");
count++;
}
if(gPlayerInfo[i][PLAYER_VIP] == 3)
{
format(string, sizeof(string),"Vip Level 3:{CCBD33} %s [GOLD]", PlayerName(i));
ShowPlayerDialog(playerid, 117, DIALOG_STYLE_MSGBOX, "{09F709}Online Vips:", string, "Ok", "");
count++;
}
}
}
if(count == 0)
{
ShowPlayerDialog(playerid, 117, DIALOG_STYLE_MSGBOX, "{09F709}Online Vips:", "----|There are Currently No Vips Online|----", "Ok", "");
}
return 1;
}
![Smiley](images/smilies/smile.png)