SA-MP Forums Archive
[FilterScript] [FS] Level System Version 1.7 by Oxside (2009) - 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)
+--- Thread: [FilterScript] [FS] Level System Version 1.7 by Oxside (2009) (/showthread.php?tid=71337)



[FS] Level System Version 1.7 by Oxside (2009) - Oxside - 31.03.2009

Level System Version 1.7

What is this?
This is an basic level system with one command (/setlevel)
You got the option to make more commands (read down)

The level are saved in an file, ive used dudb

How to make an new command for some levels only?
Make in the orginal script under the /setlevel command the next:
Код:
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
	  if(Level[playerid] == 1) // The last number is the level wich the player must be to use this level!
	  {
   	  // do here your thing the player can if he is the right level
  	  }
   	  else
  	  {
	  // do here your thing with the player if he is not the right level
	  }
	  return 1;
	}
How can i make an command that peple with level 3 and higher can use?
Simply, look down the code above. You see there the following: if(Level[playerid] == 1)
That mean: Is player level 1? To mak it lower or higher then the number you have you can put < or > before the number
Example:
Higher then level 1
Код:
if(Level[playerid] >= 1)
Lower then level 1
Код:
if(Level[playerid] <= 1)
How to install?
1. Download the .zip
2. Extract evrything
3. Put the include files in your pawno/includes folder
4. Put Level.pwn & Level.amx in your filterscripts folder
5. Open your server.cfg and add Level to your Filterscripts line!

Download:
http://pastebin.com/f5d3e453e
http://www.filefactory.com/file/af81...Sysem_V1_7_rar

Oxside


Re: [FS] Level System Version 1.7 by Oxside (2009) - Karlip - 31.03.2009

Nice,useful for RP&DM servers making level colors&menus&vehicles etc.. :P


Re: [FS] Level System Version 1.7 by Oxside (2009) - ICECOLDKILLAK8 - 31.03.2009

So this is what you wanted the dcmd command for,
Nice script, BTW, This
pawn Код:
if(Level[playerid] == > 1)
should be this
pawn Код:
if(Level[playerid] >= 1)



Re: [FS] Level System Version 1.7 by Oxside (2009) - Oxside - 31.03.2009

I will fix that
EDIT: Fixed


Re: [FS] Level System Version 1.7 by Oxside (2009) - G_ROW_Chez - 31.03.2009

too much code simple made as it made in GF.
one variable in enum and all =)


Re: [FS] Level System Version 1.7 by Oxside (2009) - Oxside - 31.03.2009

this is not a gamemode!
In gf all the includes/defines are used some more times than i used!

So it looks long but it isn't if you thin its to login code make one self!


Re: [FS] Level System Version 1.7 by Oxside (2009) - G_ROW_Chez - 31.03.2009

this is my king of levels
stock db_Get(tablename[], key[], titul[], value[])
{
format(DBQuery, sizeof(DBQuery), "SELECT %s FROM %s WHERE LOWER(%s) = LOWER('%s') LIMIT 1;", key, tablename, titul,value);
Result = db_query(DataBase, DBQuery);
db_get_field(Result, 0, DBQuery, 256);
db_free_result(Result);
return DBQuery;
}
PlayerInform[playerid][Level] = strval(db_Get("Players", "Level", "Name", db_GetPlayerName(playerid)));
and all =)



Re: [FS] Level System Version 1.7 by Oxside (2009) - Eastwood - 31.03.2009

Im not really a fan of this script but it works


Re: [FS] Level System Version 1.7 by Oxside (2009) - Oxside - 02.04.2009

@G_ROW_Chez Thats in mysql


Re: [FS] Level System Version 1.7 by Oxside (2009) - G_ROW_Chez - 02.04.2009

no, its SQLite or a_sampdb.inc
actually GF mod must be on it, because there is variableize of house(number of rooms) in files it's hard to realise, but in db very simple =)


Re: [FS] Level System Version 1.7 by Oxside (2009) - Oxside - 02.04.2009

So what you cant use it without GF...
And you doesn't made it by yourself!


Re: [FS] Level System Version 1.7 by Oxside (2009) - G_ROW_Chez - 02.04.2009

you know, i made a GM on it by myself -_-
and i'm working on RP modification like GF but much better... don't say about people all that you think - you can be wrong -_-


Re: [FS] Level System Version 1.7 by Oxside (2009) - Oxside - 02.04.2009

Your right but you to: Say not verything what you think