vip error
#1

this error only happens to VIPs on my server, when they just write "lol" it comes in VIP chat ("[VIP](NameHere): lol")

and i got:

Код:
if(text[0] == '@' && PlayerInfo[playerid][Level] >= 1 || PlayerInfo[playerid][VIP] == 1) {
  new string[128]; GetPlayerName(playerid,string,sizeof(string));
  format(string,sizeof(string),"[VIP] %s: %s",string,text[0]);
  for (new a = 0; a < MAX_PLAYERS; a++) if(IsPlayerConnected(a) && PlayerInfo[a][Level] >= 1 || PlayerInfo[a][VIP] == 1)
  SendClientMessage(a, COLOR_GREY, string);
  return 0;
  }
Reply
#2

Quote:
Originally Posted by hctiB_selffaW_yM
pawn Код:
if(text[0] == '@' && PlayerInfo[playerid][Level] >= 1 || PlayerInfo[playerid][VIP] == 1)
{
    new string[128]; GetPlayerName(playerid,string,sizeof(string));
    format(string,sizeof(string),"[VIP] %s: %s",string,text[0]);
    for (new a = 0; a < MAX_PLAYERS; a++) if(IsPlayerConnected(a) && PlayerInfo[a][Level] >= 1 || PlayerInfo[a][VIP] == 1)
    SendClientMessage(a, COLOR_GREY, string);
    return 0;
}
Your checking in the if-statement if the first character is '@' and if playerlevel is bigger than or equal to 1 OR ( || ) the player is vip. So with everything the VIPs say, goes to the vips only, change the || into &&.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)