VIP MEMBER CHAT SYSTEM , show me how? :)
#1

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
Reply
#2

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.
Reply
#3

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
Reply
#4

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
Reply
#5

and how about vip system ?
Reply
#6

if(vip[playerid]) thats the var i use. does he want a vip system too?
Reply
#7

but i dn't hv the vip system..
how to make the vip system first ?
without the register of course
Reply
#8

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;
}
Reply
#9

well its error.. cannot be compile.. the error is pawno is stop working when i compile

what happen ?
Reply
#10

i dont know. works fine for me and sasino. did you edit the code?
Reply
#11

CMDetvip(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
Reply
#12

send me your with pastebin.com
please help / solidfiles.com
Reply
#13

http://pastebin.com/e9PacBYu
Reply
#14

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?
Reply
#15

your missing the braces on OnPlayerText. also include zcmdand sscanf
Reply
#16

what braces ?
Reply
#17

http://pastebin.com/TpTcQK4k
Reply
#18

thats just to make someone a vip. if you wanna add cmds just add a check like if(vip[playerid]) etc
Reply
#19

the compiling is success,, but in game its still don;t working.. why ??
first the /setvip its unidentified command .. its weird
Reply
#20

did you load it in the firstplace?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)