VIP MEMBER CHAT SYSTEM , show me how? :) -
leingod - 24.03.2011
hello guys.. can you help me how to create a VIP system with different color chat
so the normal player chat with white color.. but if he VIP member he'll have different color. like green, red, blue.
as they want to ..
please help me guys
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
THE_KNOWN - 24.03.2011
youmean thisone?
Colour embedding:
You can use {RRGGBB} (hex) strings embedded in text to change the text colour. This works in the chat window, in dialogs, in 3D text labels, and in numberplates. Colour codes are automatically filtered with () in player chat text. The only exception to the colour code filtering is input dialog response text.
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
leingod - 24.03.2011
no.. its to hard to use..
the simple one like this /g helo! it will show to all but the color is green
only vip member
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
THE_KNOWN - 24.03.2011
im gonna try this now
if(vip[playerid] != 0)
{
new col=GetPlayerColor(playerid);
new s[128],n[32];
GetPlayerName(playerid,n,32);
format(s,128,"%s: %s",n,text);
SendClientMessageToAll(col,s);
return 0;
}
under on playertext
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
leingod - 24.03.2011
and how about vip system ?
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
THE_KNOWN - 24.03.2011
if(vip[playerid]) thats the var i use. does he want a vip system too?
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
leingod - 24.03.2011
but i dn't hv the vip system..
how to make the vip system first ?
without the register of course
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
THE_KNOWN - 24.03.2011
easy
Код:
new vip[MAX_PLAYERS];//global variable
CMD:setvip(playerid,params[])
{
new level,id;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0x000099,"Your not an admin.")//gotta be rcon
if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid,0x000099,"USAGE:/setvip [player] [level]");
vip[id]=level;//vip level depends on the valuse you give....
reuturn 1;
}
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
leingod - 24.03.2011
well its error.. cannot be compile.. the error is pawno is stop working when i compile
what happen ?
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
THE_KNOWN - 24.03.2011
i dont know. works fine for me and sasino. did you edit the code?
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
THE_KNOWN - 24.03.2011
CMD
![confused](images/smilies/confused.gif)
etvip(playerid,params[])
{
new level,id;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0x000099FF,"Your not an admin.")//gotta be rcon
if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid,0x000099FF,"USAGE:/setvip [player] [level]");
vip[id]=level;//vip level depends on the valuse you give....
reuturn 1;
}
try now
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
leingod - 24.03.2011
send me your with pastebin.com
please help / solidfiles.com
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
THE_KNOWN - 24.03.2011
http://pastebin.com/e9PacBYu
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
leingod - 24.03.2011
well my filterscript do like this
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
new vip[MAX_PLAYERS];//On the top of the script.
CMD:setvip(playerid,params[])
{
new id,lvl;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF000000,"Your not an admin.");
if(sscanf(params,"ui",id,lvl)) return SendClientMessage(playerid,0xFF000000,"USAGE:/setvip [playerid] [level]");
vip[id]=lvl;
return 1;
}
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnPlayerText(playerid, text[])
if(vip[playerid] != 0)
{
new col=GetPlayerColor(playerid);
new s[128],n[32];
GetPlayerName(playerid,n,32);
format(s,128,"%s: %s",n,text);
SendClientMessageToAll(col,s);
return 0;
}
and the errors is like this
Код:
C:\Users\AS4732Z\Desktop\SAMP Server\finalepisode\filterscripts\vip.pwn(37) : warning 209: function "OnPlayerText" should return a value
C:\Users\AS4732Z\Desktop\SAMP Server\finalepisode\filterscripts\vip.pwn(37) : warning 203: symbol is never used: "setvip"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
what's the problem?
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
THE_KNOWN - 24.03.2011
your missing the braces on OnPlayerText. also include zcmdand sscanf
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
leingod - 24.03.2011
what braces ?
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
THE_KNOWN - 24.03.2011
http://pastebin.com/TpTcQK4k
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
THE_KNOWN - 24.03.2011
thats just to make someone a vip. if you wanna add cmds just add a check like if(vip[playerid]) etc
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
leingod - 24.03.2011
the compiling is success,, but in game its still don;t working.. why ??
first the /setvip its unidentified command .. its weird
Re: VIP MEMBER CHAT SYSTEM , show me how? :) -
THE_KNOWN - 24.03.2011
did you load it in the firstplace?