SA-MP Forums Archive
[FilterScript] Leingod's Simple MessageBox v.1.0 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Leingod's Simple MessageBox v.1.0 (/showthread.php?tid=278667)

Pages: 1 2


[Inc] Leingod's TextDraw Message Box UPDATED! - leingod - 23.08.2011

Le-TextDraw Message Box


Introduction:
Код:
This  is TextDraw Message Box that will show you 
player connect / disconnect / or your own message to show.
Credits:
Код:
-Me for make this.
-Sandra18[NL] I got little code from him.
-[MWR]Blood Helping me.
Bugs:
Код:
PM me if you found any bugs
Downloads:
Код:
Older:
-Pastebin v.1.0
-Pastebin v.2.0 NOT RECOMMENDED / BUGGED
Newest:
-Pastebin v.3.0 (FilterScript version) RECOMMENDED!
-Pastebin v.3.0 (Include version) RECOMMENDED!
Changelog:
Код:
-v.1.0
*Script Released

-v.2.0
*Added command to show / hide the messagebox
/showbox /hidebox

-v.3.0
*Removed show / hide command (BECAUSE BUGGED) maybe fixed on ver 4.0
*Added simple function to add Text Draw message (Thanks to [MWR]Blood)
*Added include version
*Clean script
Warning!
Код:
The command is using zcmd include Click here to download zcmd
Picts:


Ask me for further information..

How To Install:
Код:
FilterScript version:

1.Copy the code from download link below
2.Paste it on pawn compiler
3.Save as lemessage.pwn or what ever you want, then compile...
4.Add to your filterscript line on server.cfg
example= filterscript script1 script2 lemessage
5.Run your server and enjoy....

Include version:

1.Copy The code from download link below
2.Paste it on notepad / notepad++ / your own text editor
3.Save as lemessage.inc or what ever you want.. 
4.Open your filterscript / gamemode
5.Insert #include <lemessage> under the #include <a_samp>
6.Insert this call back:

LeTextDrawInit(); Under OnGameModeInit / OnFilterScriptInit
LeTextDrawExit(); Under OnGameModeExit / OnFilterScriptExit
LeTextDrawConnect(playerid); Under OnPlayerConnect
LeTextDrawDisconnect(playerid); Under OnPlayerDisconnect

7.Then add your own text draw message using SendLeMessage(playerid, text);
You can see the example under How to add new message:
How to add new message:
Код:
SendLeMessage(playerid, "blablablabla bla blabal balbalbala");

or

new string[128], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername);
format(string, sizeof(string),"player %s is so stink", playername);
SendLeMessage(playerid, string);



Re: Leingod's Simple MessageBox v.1.0 - Rock_Ro - 23.08.2011

Photos or something?


Re: Leingod's Simple MessageBox v.1.0 - leingod - 23.08.2011

Quote:
Originally Posted by Rock_Ro
Посмотреть сообщение
Photos or something?
Uploaded


Re: Leingod's Simple MessageBox v.1.0 - Kaperstone - 23.08.2011

awasome
thanks!


Re: Leingod's Simple MessageBox v.1.0 - Zh3r0 - 23.08.2011

I see you used all the code inside the callbacks, why not making a simple function, 1 line long?


Re: Leingod's Simple MessageBox v.1.0 - Kaperstone - 23.08.2011

can you explane me how do i add more lines..
like when player disconnect it will send a message: player has disconnected
and all.. :\


Re: Leingod's Simple MessageBox v.1.0 - Horrible - 23.08.2011

not bad
4/5


Re: Leingod's Simple MessageBox v.1.0 - Davz*|*Criss - 23.08.2011

Nice


Re: Leingod's Simple MessageBox v.1.0 - leingod - 24.08.2011

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
I see you used all the code inside the callbacks, why not making a simple function, 1 line long?
don't understand

Quote:
Originally Posted by xkirill
Посмотреть сообщение
can you explane me how do i add more lines..
like when player disconnect it will send a message: player has disconnected
and all.. :\
Added
see above the picts

Quote:
Originally Posted by Horrible
Посмотреть сообщение
not bad
4/5
Thanks ^__^

Quote:
Originally Posted by Davz*|*Criss
Посмотреть сообщение
Nice
Thanks


Re: Leingod's Simple MessageBox v.1.0 - opik - 24.08.2011

Cool. but, can you make Command for Show and Hide the textdraw?.


Re: Leingod's Simple MessageBox v.1.0 - leingod - 24.08.2011

Quote:
Originally Posted by opik
Посмотреть сообщение
Cool. but, can you make Command for Show and Hide the textdraw?.
Added on version 2 ^__^ try it
sorry i didnt test the v.2.0


Re: Leingod's Simple MessageBox v.1.0 - opik - 24.08.2011

Thanks Leingood. !! Cool. i will Test it on my server


Re : Leingod's Simple MessageBox v.1.0 - Naruto_Emilio - 24.08.2011

Good job for this simple release, its simple but does a big effect


Re: Leingod's Simple MessageBox v.1.0 - Bumbis - 24.08.2011

It would be better if you made this as include. User friendly functions and stuff. ( ShowPlayerMessageBox(playerid), HidePlayerMessageBox(playerid), SendMessageBoxLine(playerid,text[]), SendMessageBoxLineForAll(text[]) ). All i would need.

But yeah.. Nice work.


Re: Leingod's Simple MessageBox v.1.0 - leingod - 25.08.2011

Quote:
Originally Posted by opik
Посмотреть сообщение
Thanks Leingood. !! Cool. i will Test it on my server
Your welcome

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
Good job for this simple release, its simple but does a big effect
Thanks

Quote:
Originally Posted by Bumbis
Посмотреть сообщение
It would be better if you made this as include. User friendly functions and stuff. ( ShowPlayerMessageBox(playerid), HidePlayerMessageBox(playerid), SendMessageBoxLine(playerid,text[]), SendMessageBoxLineForAll(text[]) ). All i would need.

But yeah.. Nice work.
Maybe sometimes
Thanks


Re: Leingod's Simple MessageBox v.1.0 - [MWR]Blood - 04.09.2011

pawn Код:
stock SendTDMessage(playerid,const text[])
{
    for(new line; line < 15; line++)
    {
        TextDrawShowForPlayer(playerid, Message[line]);
    }
    for(new line; line < 15; line++)
    {
        TextDrawHideForAll(Message[line]);
        if(line < 14)
        {
            MessageStr[line] = MessageStr[line+1];
            TextDrawSetString(Message[line], MessageStr[line]);
        }
    }
    format(MessageStr[14], 128, "%s",text);
    TextDrawSetString(Message[14], MessageStr[14]);
    for(new line; line < 15; line++)
    {
        TextDrawShowForAll(Message[line]);
    }
    return 1;
}



Re: Leingod's Simple MessageBox v.1.0 - leingod - 02.01.2012

Thanks, Updated...............


Re: Leingod's Simple MessageBox v.1.0 - FearLe$$ - 23.06.2012

can u tell me any way to make the box smaller? if yes then please pm me


Re: Leingod's Simple MessageBox v.1.0 - pasha97 - 23.06.2012

Yeah, thanks man!


Re: Leingod's Simple MessageBox v.1.0 - God'Z War - 28.09.2012

Greate job