Chat Checker -
=WoR=Varth - 25.06.2011
Chat Checker
V3
Feature:
- Chat will split to 2 lines
- Block chat from different Virtual World
- Remove '_' from player's name
- You can disable any range
- You can apply chat animation (The time depend on how long the chat)
- You can use chatbubble
- Now player have different chat in every seat inside vehicle.
- You can use /seat with chat anim
Bug Fixed
- Now every player in range can hear the chat.
This is a simple chat system. Just like Proxdetector, but more flexible.
Install
Download the
include (V3)
Copy to your server folder /pawno/include
On your top of script
You can simply add this in your OnPlayerText
pawn Код:
public OnPlayerText(playerid, text[])
{
ChatChecker(playerid,text,1,2,4,6,8,10,White1,Chat1,Chat2,Chat3,Chat4,0,0,0,0);
return 0;
}
The chat can be visible depending with range(range1,range2,range3,range4,range5). And each range have their own color(color1,color2,color3,color4,color5)
Put 1 in anim to enable anim chat(The anim time is depend on chat lenght.
Put 1 in bubble to enable chat bubble (text above your head).bubblecolor for the color, bubblerange for the draw distance, bubbletime for the time for the bubble before dissapear.
For Example:
pawn Код:
ChatChecker(playerid,text,1,5,7,10,15,17,White1,Chat1,Chat2,Chat3,Chat4,1,Red,5000,5);
Player will see the chat with color Chat1 if they are in the range of 5 meters.
Player will see the chat with color Chat2 if they are in the range of 7 meters.
And so on.
This will use chat animation.
This will use chat bubble with color red(define it by your self), visible in 5 meters and in 5 seconds will dissapear.
With V2 you can disable certain range by put 0 in it.
For Example:
pawn Код:
ChatChecker(playerid,text,1,5,0,10,0,15,White1,Chat1,Chat2,0,0,1,Red,5000,5);
That will disable range2 and range 4.
With V3 now you can add this command:
pawn Код:
CMD:seat(playerid,params[])
{
if(PlayerSeat[playerid] == true) ApplyAnimation(playerid,"PED","SEAT_UP",4,0,0,0,0,0,1),PlayerSeat[playerid] = false;
else ApplyAnimation(playerid,"PED","SEAT_DOWN",4,0,0,0,1,0,1),PlayerSeat[playerid] = true;
return 1;
}
That's for ZCMD.
You can use them in another command processor (With edit of course).
You can add this with your /me or /ame command:
pawn Код:
CMD:me(playerid,params[])
{
new string[128],Float:X,Float:Y,Float:Z;
if(sscanf(params,"s[128]",string)) return SendClientMessage(playerid,Yellow,"Usage: /me <text> ~To tell what you do.");
else{ ChatChecker(playerid,text,1,5,7,10,15,17,White,Chat1,Chat2,Chat3,Chat4,1,Red,5000,5);
return 1;
}
If you want to get player's name without using Chat Checker just simply do:
For example:
pawn Код:
format(string,sizeof(string),"%s flying through the sky asuwwjasy",NameUnder(playerid));
NOTE
You need to have
foreach.inc (by ******) to use this include.
White1,Chat1,Chat2,Chat3,Chat4 laready defined inside include.
You have any suggestion? Put them here!!
Any question? Put here or add my MSN.
Okay folks have fun.
Re: Chat Checker -
serman - 25.06.2011
Nice
Re: Chat Checker -
Tachibana - 25.06.2011
Nice work! useful will use it!
Re: Chat Checker -
BizzyD - 25.06.2011
Very nice :P Good job
Re: Chat Checker -
[Ask]Terminator - 25.06.2011
very usefull !
Re: Chat Checker -
=WoR=Varth - 25.06.2011
Updated
Current update:
-You can disable the range
-You can apply chat animation
-You can use chatbubble
Re: Chat Checker -
Calgon - 25.06.2011
Chat messages generally never exceed 128 characters, so I don't quite understand why even in your example, you've declared a string the size of 512.
Plus, a more fitting name for this might be 'chat format' - since this doesn't really check much, it formats an input, essentially.
Despite those 2 things, I guess: good work.
Re: Chat Checker -
=WoR=Varth - 25.06.2011
Quote:
Originally Posted by Calg00ne
Chat messages generally never exceed 128 characters, so I don't quite understand why even in your example, you've declared a string the size of 512.
Plus, a more fitting name for this might be 'chat format' - since this doesn't really check much, it formats an input, essentially.
Despite those 2 things, I guess: good work.
|
Oh forgot that, sorry
Hmm IDK what's the fit name for it. Maybe you're right. I'll change it later.
Btw thanks
Re: Chat Checker -
Tachibana - 26.06.2011
Quote:
Originally Posted by varthshenon
Updated
Current update:
-You can use chatbubble
|
What do you mean by chatbubble? something like in MTA?
Re: Chat Checker -
=WoR=Varth - 26.06.2011
Text above your head.
Btw I just figured out I forgot to apply anim inside the car. Be fixed soon.
Re: Chat Checker -
[BP]Tony - 26.06.2011
Nice!
Re: Chat Checker -
Tachibana - 26.06.2011
Just a question, when I got it I dont need proxdetector?
Re: Chat Checker -
=WoR=Varth - 26.06.2011
You don't need proxdetector no more.
Re: Chat Checker -
Tachibana - 26.06.2011
Quote:
Originally Posted by varthshenon
You don't need proxdetector no more.
|
Wooh saves a lot of time
so it is great for roleplay because it is a local chat rite?
And just to have it working u add it as #include ?
Re: Chat Checker -
Luis- - 26.06.2011
Looks good. Good job mate.
Re: Chat Checker -
=WoR=Varth - 26.06.2011
Yes this is local chat.
Don't forget to put the include file to your pawno include folder.
Re: Chat Checker -
=WoR=Varth - 26.06.2011
Sorry for double post but bug fixed.
Now player have different anim each seat inside vehicle.
Re: Chat Checker -
Tachibana - 26.06.2011
Founded a bug. When a player chats he does not see what he wrote only the player near him sees the text (if u ment to do it that way?)
As well the animations sometimes get stuck and keep on going and going and dont stop
as well the meters are kinda f'up I was 2 meters away but i had setted it to 5 and the guy couldnt hear me nor the chat did go differ color
EDIT: it shows in differ color when far away ONLY with full capital letters
Re: Chat Checker -
=WoR=Varth - 26.06.2011
Download the lastest include and tell me if you still get the bug.
Re: Chat Checker -
Tachibana - 26.06.2011
yes still the same and there is no chatbubble...
Players dont see what they write, only ppl near them, ranges are kinda fucked up as well :\
EDIT: As well ONLY one player sees the text, my friend was writing I didnt see it but WHEN I was writing He could see it and we were very near!