[Include] Server News Box - 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)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Server News Box (
/showthread.php?tid=464757)
Server News Box -
Vege - 18.09.2013
NewsBox
Hi,
This is an
Include which would create a textdrawbox at the right bottom corner of your screen in your
SA-MP Server.
The changes you need to make in your GM/FS if you're going to use this are as follows.
First, On the top of your Script you would have to write this:
Second, Under OnGameModeInit()/OnFilterScriptInit() you would have to add the following:
pawn Код:
public OnGameModeInit()
{
NewsBoxTextDrawInit();
return 1;
}
Third, Under OnPlayerConnect(playerid) you would have to add the following:
pawn Код:
public OnPlayerConnect(playerid)
{
NewsBoxTextDrawConnect(playerid);
return 1;
}
Finally, You would've to add the following under OnPlayerDisconnect(playerid):
pawn Код:
public OnPlayerDisconnect(playerid)
{
NewsBoxTextDrawDisconnect(playerid);
return 1;
}
pawn Код:
/* native (Fuction Of the Include)
SendNewsBoxMessage(playerid, const text [])
*/
Screenshot:
I'd soon be releasing an FS related to this and would try to update this too since this is the very basic thingy.
Downloads:
Mediafire
Pastebin
I Hope people like it.
Re: Server News Box -
Lordzy - 19.09.2013
You must use "Hooking" methods here to prevent others being forced to add those functions under callbacks. Other than that, nice. Improve the design tho.
Re: Server News Box -
Vege - 19.09.2013
Quote:
Originally Posted by Lordz™
You must use "Hooking" methods here to prevent others being forced to add those functions under callbacks. Other than that, nice. Improve the design tho.
|
Yeah, you're right would use ALS hooking for the update so that way it'd be easier. And didn't get you on 'improve the design' ? What do you mean?
Re: Server News Box -
Lordzy - 19.09.2013
Quote:
Originally Posted by Vege
Yeah, you're right would use ALS hooking for the update so that way it'd be easier. And didn't get you on 'improve the design' ? What do you mean?
|
I haven't checked the codes, though as you've posted the screens of your textdraw, I suggest to make it much more better. (Colorful, or giving it a better view than the current one)
Re: Server News Box -
DemME - 20.12.2013
It comes with the huge box in the right side of the screen? if I'd like to remove it, how I can do this?