[Include] [INC] Rank/Level System [Version 2.0]
#61

ok take a look at this

i didnt modify the inc

and i put it in pawno/include
and made the "PlayerFiles" File in script files
Script:

includes:
Код:
#include <a_samp>
#include <a_players>
#include <Ranks>

#if defined FILTERSCRIPT
OnGameModeInit:
Код:
public OnGameModeInit()
{      //Ranks/Levels
	SetPromotionMode(1);
        AddRank(1, "Level2", 1, 10000, 100, 100, 20, 30);
	return 1;
}
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/level", true) == 0)
	{
  		GetRankInfo(playerid);
  		return 1;
	}

	if(strcmp(cmdtext, "/mystats", true) == 0)
	{
  		GetPlayerStats(playerid);
  		return 1;
	}
	return 0;
}
commands are working fine
i set promotion mode to 1
and the requirements to 1

and out in script files i change the user time played in server to

0 hours
59 minutes so it should rank up in 1min
but nothing happen why??

i typed /mystats

rank :0 --
time:1h 3min
nothing happened
can u help me please
Reply
#62

Quote:
Originally Posted by Kyro
Посмотреть сообщение
ok take a look at this

i didnt modify the inc

and i put it in pawno/include
and made the "PlayerFiles" File in script files
Script:

includes:
Код:
#include <a_samp>
#include <a_players>
#include <Ranks>

#if defined FILTERSCRIPT
OnGameModeInit:
Код:
public OnGameModeInit()
{      //Ranks/Levels
	SetPromotionMode(1);
        AddRank(1, "Level2", 1, 10000, 100, 100, 20, 30);
	return 1;
}
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/level", true) == 0)
	{
  		GetRankInfo(playerid);
  		return 1;
	}

	if(strcmp(cmdtext, "/mystats", true) == 0)
	{
  		GetPlayerStats(playerid);
  		return 1;
	}
	return 0;
}
commands are working fine
i set promotion mode to 1
and the requirements to 1

and out in script files i change the user time played in server to

0 hours
59 minutes so it should rank up in 1min
but nothing happen why??

i typed /mystats

rank :0 --
time:1h 3min
nothing happened
can u help me please
Ok let me explain, your stats will never get updated IN-GAME until you do a function for that. Your account will be saved on exit.
The server runs a timer to check the online time each minute, it updates a variable, but not the account.

Change thing into your account, (While not in game) and reconnect. you will rankup.

You set minutes 59 in your account, but in-game the variable jsut got time to update up to 5-6 minutes.
Reply
#63

do u mean that the server ingame update my stats in 5-6 mins??

if so how to make it like 30 sec or 1min

if not explain more please and tell me what to do
thank you
Reply
#64

Quote:
Originally Posted by Kyro
Посмотреть сообщение
do u mean that the server ingame update my stats in 5-6 mins??

if so how to make it like 30 sec or 1min

if not explain more please and tell me what to do
thank you
Take a look into the include and see which variable gets update by what timer.
Take that variable and use it in game, as a command like /setonlinetime.
Reply
#65

Nice thanks
Reply
#66

Very nice, Useless to me though.
Reply
#67

I cant uderstand this?!
Reply
#68

nice work
Reply
#69

Very great !
Reply
#70

Great work.
Reply
#71

GJ!!!!
Reply
#72

Hey, I'm new to scripting and I'm making a DM server, I'm trying to use this include, but the server crashes whenever I uncomment this line:
pawn Код:
OnPlayerConnect(playerid)
{
//S_OnPlayerConnect(playerid);
And when the line is commented, the stats don't update, I have all the includes and the script gives no errors or warnings when compiling. I've tried it with no filterscripts and no plugins, but the server still crashes. Please help me.

Never mind, I fixed it, forgot to make the PlayerFiles folder in scriptfiles.
Reply
#73

wow the best inc ever, really helpful to me
ur great
Reply
#74

I will use this on my server thx
Reply
#75

Amazing is it possible to make admin command of /setrank? Please help!
Reply
#76

can we give more weapon ?? if we can how ??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)