This is TextDraw Message Box that will show you player connect / disconnect / or your own message to show.
-Me for make this. -Sandra18[NL] I got little code from him. -[MWR]Blood Helping me.
PM me if you found any bugs
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!
-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
The command is using zcmd include Click here to download zcmd
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:
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);
I see you used all the code inside the callbacks, why not making a simple function, 1 line long?
|
can you explane me how do i add more lines..
like when player disconnect it will send a message: player has disconnected and all.. :\ |
Good job for this simple release, its simple but does a big effect
|
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. |
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;
}