[Include] Server News Box
#1

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:

pawn Код:
#include <NewsBox>
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.

Reply
#2

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

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?
Reply
#4

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)
Reply
#5

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)