vip error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: vip error (
/showthread.php?tid=66079)
vip error -
My_Waffles_Bitch_L0L - 19.02.2009
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;
}
Re: vip error -
Marcel - 19.02.2009
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 &&.