12.04.2014, 12:26
HBox
Introduction:
This is the box which is mainly use for showing the server news to all players. I am releasing Fliterscript and Include of this script. Hope u like it.
About Box:
Box shows maximum 8 lines
Transparent Box Color(Black)
6 color for Box that contain "Server news" Text.
How to use?
For Filterscript:
Download the .rar file from the link.
Put Hbox.pwn and Hbox.amx in the filterscript folder.
Open the server.cfg file
Add Hbox at the side of "filterscript" text.
Start your server.
For Include:
Download the .rar file from the link.
Put Hbox.inc in pawno/include
Open your script and add this at the top of your script
pawn Код:
#include <Hbox>
pawn Код:
public OnGameModeInit()
{
HTextDrawInit();
return 1;
}
pawn Код:
public OnFilterScriptExit()
{
HTextDrawExit();
return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
HTextDrawConnect(playerid);
return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
HTextDrawDisconnect(playerid);
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
Bcolor(dialogid, listitem);
return 1;
}
Use "HBoxMessage(color, message[]);".
Example:
pawn Код:
new str[128],Name[MAX_PLAYERS];
GetPlayerName(playerid,Name,sizeof(Name));
format(str, sizeof(str),"%s has ~g~joined~w~ the server", Name);
HBoxMessage(playerid, str);
Use /boxcolor. You need to be Rcon admin to use this command.
Images:
Default Box Color
All colors
Purple
Green
Download link:
http://www.solidfiles.com/d/45648d726a/HBox
Hope that u understand everything! Any problem then ask on this thread.