[FilterScript] Leingod's Simple MessageBox v.1.0
#1

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:
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);
Reply
#2

Photos or something?
Reply
#3

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

awasome
thanks!
Reply
#5

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

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

not bad
4/5
Reply
#8

Nice
Reply
#9

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

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

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

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

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

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

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

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

Thanks, Updated...............
Reply
#18

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

Yeah, thanks man!
Reply
#20

Greate job
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)