Smart Chat V1 -
=WoR=Varth - 29.06.2011
Smart Chat
V1
Newer version
V1 Features:
SmartChatGeneral
SmartChatAnim
SmartChatBubble
SmartChatLog
/seat
Description:
SmartChatGeneral
pawn Код:
SmartChatGeneral(playerid,stringtext[],log,addition[],range1,range2,range3,range4,range5,color1,color2,color3,color4,color5)
___________________
pawn Код:
playerid = Sender (f.e: playerid,3,toplayerid,etc)
stringtext[] = The chat string (f.e: string,"This is the chat",chat,etc)
log = 1 to save the log. 0 to do nothing with the log. (Chat log.ini is saved inside scriptfiles)
addition = To put additional text inside the chat (f.e "Low",string,"Wishper",etc)
range1 - range5 = The chat range (In meter)
color1 - color5 = The chat color
___________________
There's 6 chat format:
pawn Код:
addition = string My Name[string]: Testing.
addition = 0 My Name: Testing.
addition = -1 *My Name Testing.*
addition = -2 Testing. ((My Name))
addition = -3 (([id]My Name: Testing.))
addition = -4 (([OOC]My Name: Testing.))
___________________
Example:
pawn Код:
SmartChatGeneral(playerid,text,1,"Low",2,4,6,8,10,White1,Chat1,Chat2,Chat3,Chat4);
Will show:
pawn Код:
My Name[Low]: (string of text)
pawn Код:
SmartChatGeneral(playerid,"Testing.",1,-1,2,4,6,8,10,White1,Chat1,Chat2,Chat3,Chat4);
Will show:
You can change the range to whatever you want. Put 0 in it to
disable certain range.
Put -1 in range1 to make global chat.
___________________
SmartChatAnim
pawn Код:
SmartChatAnim(playerid,stringtext[],length)
___________________
pawn Код:
playerid = Player who do anim (f.e: playerid,3,toplayerid,etc)
stringtext[]= The chat string to get the string length (f.e: string,"This is the chat",chat,etc)
length = The chat time (f.e 25,50,75,etc.)
___________________
1 character is counted as 1 ms.
Formula:
So if you have (I am handsome)13 character in your stringtext[] and you put 50 in your length, player will do anim in:
___________________
SmartChatBubble
pawn Код:
SmartChatBubble(playerid,string,1,1,Purple,Purple,10,5000);
___________________
pawn Код:
playerid = The player (f.e: playerid,3,toplayerid,etc)
stringtext[] = The bubble string (f.e: string,"This is the bubble",bubble,etc)
log = 1 to save the log. 0 to do nothing with the log. (Chat log.ini is saved inside scriptfiles)
selftext = 1 to send stringtext[] to playerid. 0 To do nothing with it
selftextcolor = The color of selftext
range = Draw distance of the bubble
time = Time of the bubble to destroyed
___________________
SmartChatLog
___________________
pawn Код:
string = The string that will be writed to log
You can add this anywhere you want it. It will saved in same file as the other log (Chat log.ini)
Extra:
NameUnder(playerid) to get player's name without "_"
TimeDate() to get time and date.
pawn Код:
public OnPlayerText(playerid,text[])
{
if(IsPlayerInAnyVehicle(playerid)) VehicleChat(playerid,text);
SmartChatGeneral(playerid,text,0,"0",5,7,10,15,17,White1,Chat1,Chat2,Chat3,Chat4);
SmartChatAnim(playerid,text,at);
SmartChatLog(text);
return 0;
}
Note- White1,Chat1,Chat2,Chat3 and Chat4 alreadi defined inside include.
- This will remove "_" in player's name.
- Block chat from different virtual world.
- The chat will be splitted to 2 lines.
![](http://i190.photobucket.com/albums/z115/varthshenon/sa-mp-006.png)
- You can add /seat command to your script depend on what command processor you use. f.e:
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. Seat also have unique chat anim.
Installation
Download
Smart Chat V1.inc (Click skip on top right of your screen)
Copy SmartChat.inc to your server folder /pawno/include
Put this on top of your script:
Important!
You must have
foreach and
YSI
You can disable anim for a while with put this anywhere you want it:
pawn Код:
AnimON[playerid] = false;
But remember you have to put this to enable it again.
You have any question/suggestion/bug? Put them here!!!
Please put any feedback.
Okay folks have fun.
Re: Smart Chat -
coole210 - 29.06.2011
Meh, looks good enough :P Why does it say..
Код:
...,This is chat 4-
-chat 4,...
Re: Smart Chat -
=WoR=Varth - 29.06.2011
Quote:
Originally Posted by coole210
Meh, looks good enough :P Why does it say..
Код:
...,This is chat 4-
-chat 4,...
|
To make it easier for player to read.
Re: Smart Chat -
dr.pepper - 29.06.2011
lol, you could just skip a line, anyways, great job. Great for RP'ers
Re: Smart Chat -
=WoR=Varth - 29.06.2011
Quote:
Originally Posted by dr.pepper
lol, you could just skip a line, anyways, great job. Great for RP'ers
|
If people ask me to do this then I'll change that.
Thanks.
Re: Smart Chat -
Tachibana - 29.06.2011
Finally new version
![Cheesy](images/smilies/biggrin.png)
Gonna test it out on my server now ;]
Re: Smart Chat -
Rickye - 29.06.2011
working perfectly...
thanks, varthshenon.
Re: Smart Chat -
Tachibana - 29.06.2011
Quote:
Originally Posted by Rickye
working perfectly...
thanks, varthshenon.
|
Mhm not for me sine his y_ini has a conflict with my one...
Re: Smart Chat V1 -
Sasino97 - 29.06.2011
Quote:
Originally Posted by varthshenon
Impotant!
|
o.O Impotant
Re: Smart Chat -
steki. - 29.06.2011
I see you're a LS-RP player developing its systems.
Very good for a newbie scripter (;
Good luck in next scripts.
Re: Smart Chat -
=WoR=Varth - 29.06.2011
Quote:
Originally Posted by Rickye
working perfectly...
thanks, varthshenon.
|
You're welcome
Quote:
Originally Posted by Tachibana
Mhm not for me sine his y_ini has a conflict with my one...
|
That's not my y_ini. That's ******'s y_ini and always be.
Quote:
Originally Posted by [GF]Sasino97
o.O Impotant
|
![Tongue](images/smilies/razz.gif)
edited
Quote:
Originally Posted by Luнs Miki
I see you're a LS-RP player developing its systems.
Very good for a newbie scripter (;
Good luck in next scripts.
|
Yes I am but too bad I'm banned for doing something stupid
![Cheesy](images/smilies/biggrin.png)
But thanks to LS-RP, if they didn't ban me I would never learn scripting sa-mp.
And this isn't their system
Btw, If you have any suggestion don't be shame to post it here.
Re: Smart Chat -
Tachibana - 30.06.2011
Quote:
Originally Posted by varthshenon
You're welcome
That's not my y_ini. That's ******'s y_ini and always be.
![Tongue](images/smilies/razz.gif) edited
Yes I am but too bad I'm banned for doing something stupid ![Cheesy](images/smilies/biggrin.png)
But thanks to LS-RP, if they didn't ban me I would never learn scripting sa-mp.
And this isn't their system
Btw, If you have any suggestion don't be shame to post it here.
|
It was ment to be used as a metaphor...
Anyways you gonna try to get that stuff fixed?
Re: Smart Chat -
=WoR=Varth - 30.06.2011
Quote:
Originally Posted by Tachibana
It was ment to be used as a metaphor...
Anyways you gonna try to get that stuff fixed?
|
I see no problem when I compile it with blank script.
Post your error message.
Re: Smart Chat -
Tachibana - 30.06.2011
Quote:
Originally Posted by varthshenon
I see no problem when I compile it with blank script.
Post your error message.
|
All of them are y_ini errors:
((addes as a picture, too much errors to copy around)) these are all errors, happens even when I ONLY add
and when removed script works perfectly fine.
Re: Smart Chat -
=WoR=Varth - 30.06.2011
Where is the error happen?
Inside SmartChat include or y_ini include?
Re: Smart Chat -
Tachibana - 30.06.2011
Quote:
Originally Posted by varthshenon
Where is the error happen?
Inside SmartChat include or y_ini include?
|
Error happens on my y_ini GM when I add include <smartchat>
Re: Smart Chat -
=WoR=Varth - 30.06.2011
Quote:
Originally Posted by Tachibana
Error happens on my y_ini GM when I add include <smartchat>
|
Try to make a blank script and compile it with Smart Chat. I guess your GM is messed with Smart Chat (You make a new global variable or IDK something I don't understand (yet)).
I didn't see any problem in it.
Re: Smart Chat -
Tachibana - 30.06.2011
Quote:
Originally Posted by varthshenon
Try to make a blank script and compile it with Smart Chat. I guess your GM is messed with Smart Chat (You make a new global variable or IDK something I don't understand (yet)).
I didn't see any problem in it.
|
Works on a blank GM...
My guts are telling me its a conflict between y_ini's...
((Blank GM that SmartChat works DOES NOT use y_ini))
Re: Smart Chat -
=WoR=Varth - 30.06.2011
Forgot to tell this, put -1 in range1 to make global chat.
Re: Smart Chat -
letters - 03.07.2011
Cool!!
I love this.