07.03.2012, 20:44
I have problem in my VipList Command:
if there is more than 2 players its show:
--- Vip ----
---- Vip ----
2)DownLoaD
---- vip -----
4)SingelOut
---- vip -----
pawn Код:
if(strcmp(cmdtext,"/VipList",true) == 0)
{
printf("[INFO]: \"%s\" Typed /VipList",GetName(playerid));
if(IsPlayerConnected(playerid))
{
new count = 0;
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPViP(i))
{
SendClientMessage(playerid,COLOR_WHITE,"--- ViP ---");
format(string,sizeof(string),"%d) \"%s\" [id: %d | ViP Level: %d]",i,GetName(i),i,GetVipLevel(i));
SendClientMessage(playerid,COLOR_YELLOW,string);
count++;
SendClientMessage(playerid,COLOR_WHITE,"--- ViP ---");
}}}
if(count == 0) return SendClientMessage(playerid,COLOR_RED,"! no VIP");
}
return 1;
}
--- Vip ----
---- Vip ----
2)DownLoaD
---- vip -----
4)SingelOut
---- vip -----