SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 25/06/2011, 03:27 AM   #1
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 2,010
Reputation: 133
Default Chat Checker

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
pawn Code:
#include <ChatChecker>

You can simply add this in your OnPlayerText
pawn Code:
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 Code:
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 Code:
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 Code:
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 Code:
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:
pawn Code:
NameUnder(playerid)

For example:
pawn Code:
format(string,sizeof(string),"%s flying through the sky asuwwjasy",NameUnder(playerid));

NOTE
You need to have foreach.inc (by Y_Less) 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.
__________________
(RETIRED)

Last edited by =WoR=Varth; 27/06/2011 at 01:37 AM.
=WoR=Varth is offline   Reply With Quote
Old 25/06/2011, 03:28 AM   #2
serman
Big Clucker
 
serman's Avatar
 
Join Date: Dec 2010
Location: India
Posts: 156
Reputation: 15
Default Re: Chat Checker

Nice
__________________
My Work
__________________________________________________ _____
[GameMode]World Stunting
| [FilterScript]Simple AFK/BRB Sys. | [FilterScript]Rank System V1.0
[GameMode]Advanced MissionsNew
[CENTER]
Scripting for $$ PM me if u r interested..
serman is offline   Reply With Quote
Old 25/06/2011, 03:55 AM   #3
Tachibana
Huge Clucker
 
Tachibana's Avatar
 
Join Date: May 2011
Posts: 450
Reputation: 14
Default Re: Chat Checker

Nice work! useful will use it!
__________________
Tokyo! Because we all love Japan. Coming soon!
Tachibana is offline   Reply With Quote
Old 25/06/2011, 04:32 AM   #4
BizzyD
Gangsta
 
BizzyD's Avatar
 
Join Date: Jan 2011
Location: Home
Posts: 938
Reputation: 66
Default Re: Chat Checker

Very nice :P Good job
__________________
We never fail, we only shine with brilliance. One king one faith one religion. And if you hear me come and join the revolution
BizzyD is offline   Reply With Quote
Old 25/06/2011, 05:27 PM   #5
[Ask]Terminator
Huge Clucker
 
[Ask]Terminator's Avatar
 
Join Date: Jan 2009
Posts: 198
Reputation: 3
Default Re: Chat Checker

very usefull !
__________________
Code:
[Ask]Terminator is offline   Reply With Quote
Old 26/06/2011, 12:29 AM   #6
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 2,010
Reputation: 133
Default Re: Chat Checker

Updated


Current update:
-You can disable the range
-You can apply chat animation
-You can use chatbubble
__________________
(RETIRED)
=WoR=Varth is offline   Reply With Quote
Old 26/06/2011, 12:45 AM   #7
Calgon
Godfather
 
Calgon's Avatar
 
Join Date: Jan 2009
Posts: 6,471
Reputation: 1126
Default Re: Chat Checker

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.
Calgon is offline   Reply With Quote
Old 26/06/2011, 12:50 AM   #8
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 2,010
Reputation: 133
Default Re: Chat Checker

Quote:
Originally Posted by Calg00ne View Post
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
__________________
(RETIRED)
=WoR=Varth is offline   Reply With Quote
Old 26/06/2011, 01:08 AM   #9
Tachibana
Huge Clucker
 
Tachibana's Avatar
 
Join Date: May 2011
Posts: 450
Reputation: 14
Default Re: Chat Checker

Quote:
Originally Posted by varthshenon View Post
Updated


Current update:
-You can use chatbubble
What do you mean by chatbubble? something like in MTA?
__________________
Tokyo! Because we all love Japan. Coming soon!
Tachibana is offline   Reply With Quote
Old 26/06/2011, 01:11 AM   #10
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 2,010
Reputation: 133
Default Re: Chat Checker

Text above your head.

Btw I just figured out I forgot to apply anim inside the car. Be fixed soon.
__________________
(RETIRED)
=WoR=Varth is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Admin Chat < Admins can't see chat or my text, but I can see their chat Andy_McKinley Help Archive 37 17/05/2011 09:26 PM
[FilterScript] Chat Protect [Segurança em seu Chat] ipsBruno Lançamentos/Releases 23 17/12/2010 05:20 PM
OOC chat and Normal Chat RoneyRemington Help Archive 6 23/02/2010 02:29 AM


All times are GMT. The time now is 09:24 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.