rules.inc. Make your server rules with one simple line!!! -
RajatPawar - 17.01.2013
Hello. In most of the servers around, I have seen sucky, too-bright and horrible looking rules, so I made this. It's a quickie. Any suggestions/positive criticism will be surely accepted. Very simple.
************************************************** *****
Screenshot:

************************************************** *****
Functions:
pawn Code:
native ShowRulesForPlayer(playerid, rule1, rule2 (optional), rule3 (optional), rule4 (optional), rule5 (optional), rule6 (optional));
native HideRulesForPlayer(playerid);
************************************************** *****
Example scripts:
pawn Code:
#define FILTERSCRIPT
#include <a_samp>
#include <rules>
#include <zcmd>
new rules[MAX_PLAYERS]=0;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
Rules();
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
CMD:rules(playerid)
{
ShowRulesForPlayer(playerid, "Hello!");
rules[playerid]=1;
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(rules[playerid]==1)
{
if(newkeys & KEY_FIRE)
{
HideRulesForPlayer(playerid);
SendClientMessage(playerid,COLOR_RED,"Cancelled selection.");
}
}
return 1;
}
*********************************
Credits:
<sscanf2> - For the example script.
<iPleoMax> - For his awesome textdraw editor.
************************************
Downloads and must-do.:
Please write the line:
underneath your:
pawn Code:
public OnFilterScriptInit()
function!!!
Make sure to do this, otherwise it won't work.
***************
rules.inc attached.
Re: rules.inc. Make your server rules with one simple line!!! -
Edvin - 17.01.2013
Too simple ... you can code this directly to your GM xD. But, this include is usefull because you don't need to create the textdraw (for lazy scripters) xD
Re: rules.inc. Make your server rules with one simple line!!! -
RajatPawar - 17.01.2013
I know ! I don't expect compliments, just that it takes some time to make a decent textdraw and some people have really sucky TD designing skills!
And yeah, I didn't expect/don't expect compliments, it's just for the people who could use this. If anyone does, cheers!
IT'S TOO SIMPLE, I agree!
Re: rules.inc. Make your server rules with one simple line!!! -
[rG]Cold - 17.01.2013
Quote:
Originally Posted by Rajat_Pawar
I know ! I don't expect compliments, just that it takes some time to make a decent textdraw and some people have really sucky TD designing skills!
|
Yeah but there are FilterScripts that help people create good looking textdraws.
And also i support what Edvin said. :/
Re: rules.inc. Make your server rules with one simple line!!! -
Zh0ro - 17.01.2013
Nice, you can use with (getarg/numarg/setarg) for improve the function "ShowRulesForPlayer".
Re: rules.inc. Make your server rules with one simple line!!! -
Djole1337 - 17.01.2013
Still don't see why this is include.
Re: rules.inc. Make your server rules with one simple line!!! -
SuperViper - 17.01.2013
You should use hooks so people don't have to put the
Rules function in their script. Also, you can make an unlimited amount of rules by using
... as the parameter of the function and then using
getarg and
numarg to retrieve them and separate each one with a
~n~.
Re: rules.inc. Make your server rules with one simple line!!! -
Pasa - 17.01.2013
Every body can do that ho is working with textdraws (like me)i i prefer to put it into a inc file because the script is beautiful (less lines)