SA-MP Forums Archive
Rank (Level System) NOT ADMIN, BUT PLAYER - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Rank (Level System) NOT ADMIN, BUT PLAYER (/showthread.php?tid=100040)



Rank (Level System) NOT ADMIN, BUT PLAYER - [AG]_Just - 02.10.2009

Hello all sa-mp'ers. Have a question about rank, level system.
Players can buy them, and use some commands.
like
1 level rank/costs 40000/ gives command /flip
2 level rank/costs 80000/ gives command /count
like that.

How to script that?


Re: Rank (Level System) NOT ADMIN, BUT PLAYER - brett7 - 02.10.2009

how do you define levels?


Re: Rank (Level System) NOT ADMIN, BUT PLAYER - [AG]_Just - 02.10.2009

like ranks.


Re: Rank (Level System) NOT ADMIN, BUT PLAYER - brett7 - 02.10.2009

yeah but how do you define it like level[playerid] etc.


Re: Rank (Level System) NOT ADMIN, BUT PLAYER - [AG]_Just - 02.10.2009

Like u can use some new commands when u have new level, who is not avaible for 0 level. and u can get cash and buy that levels.


Re: Rank (Level System) NOT ADMIN, BUT PLAYER - (Jeff) - 02.10.2009

Quote:
Originally Posted by Y_Leѕѕ
This would just be done in exactly the same way as admin levels. The only thing that defines levels as admin levels is you and the commands you choose to allow them to use and what you think normal people and admin people can use. Essentially these are admin levels, but without access to commands such as kick and ban. However I would suggest the use of a group system such as that found in YSI to separate the permissions, most admin systems are inclusive - the higher up admins have all the commands of the lower ones, if you were to use these systems all admins would have access to the "/flip" and "/count" commands, even though they may not have paid for them as players (though whether or not that's what you want is entirely up to you). The group system means you can easily and dynamically define exactly who can use what commands, so using your payment system you can simply add someone to the "flip users" group and from then on they have access to it (and, if you're using the YSI user system, this information may be saved automatically (depending on whether you use a named group or not)).
Something like this?
Код:
 
Money = GetPlayerMoney(playerid);
if (strcmp("/levelup", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pLevel] == 0)
 {
 if(Money >= 40000)
  {
  SendClientMessage(playerid,Your_color_here,"You Have Upgraded To Level 1!
  PlayerInfo[playerid][pLevel] == 1)
  Return 1;
  }
 }
else
ElseIf(PlayerInfo[playerid][pLevel] == 1}
{
 if(Money >= 80000)
 {
  // u can do the rest!