[Include] rules.inc. Make your server rules with one simple line!!!
#1

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:
pawn Code:
Rules();
underneath your:
pawn Code:
public OnFilterScriptInit()
function!!!
Make sure to do this, otherwise it won't work.

***************
rules.inc attached.
Reply
#2

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

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

Quote:
Originally Posted by Rajat_Pawar
View Post
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. :/
Reply
#5

Nice, you can use with (getarg/numarg/setarg) for improve the function "ShowRulesForPlayer".
Reply
#6

Still don't see why this is include.
Reply
#7

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~.
Reply
#8

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


Forum Jump:


Users browsing this thread: 1 Guest(s)