I got a /vips cmd to show online vips
But if i am not a vip and other player is vip it doesnt show him and say There are no VIP's online!
If i am a vip it show both of us
Any help please
Here is the code
But if i am not a vip and other player is vip it doesnt show him and say There are no VIP's online!
If i am a vip it show both of us
Any help please
Here is the code
Code:
CMD:vips(playerid, params[])
{
new string[128], acount = 0, Name[MAX_PLAYER_NAME];
foreach(Player, i) {
if(IsPlayerVipMember(playerid)) {
acount++;
}
}
if(acount > 0) {
SendClientMessage(playerid, COLOR_GREEN, "----------Online VIP's----------");
foreach(Player, i) {
if(IsPlayerVipMember(playerid)) {
GetPlayerName(i, Name, sizeof(Name));
format(string, sizeof string, "VIP: %s", Name);
SendClientMessage(playerid, COLOR_GREEN, string);
}
}
format(string, sizeof string, "Total VIP's online: %d.", acount);
SendClientMessage(playerid, -1, string);
}
else if(acount < 1) SendClientMessage(playerid, 0xD8D8D8FF, "There are no VIP's online!");
return 1;
}