Levels
#1

Where could i get a level system like i do /buylevel and the command /flip unlocks for me and in the TAB it shows my new score? If someone has made something like that please let me know! Or if there is a tutorial send that please
Reply
#2

Assuming you have a player system using pInfo or PlayerInfo style... This is very simple, and probably not a very good command but it's just so you get the gist. I'd recommend making it more advanced and such.

pawn Код:
#define MAXIMUM_LEVEL 1000
#define FLIP_LEVEL 2
#define LEVEL_COST 100000
CMD:buylevel(playerid, params[])
{
if(PlayerInfo[playerid][pLevel] >= MAXIMUM_LEVEL) return SCM(playerid, -1, "You have reached the maximum level.");
else {
if(GetPlayerCash(playerid) < LEVEL_COST) return scm(playerid, -1, "You don't have enough money.");
PlayerInfo[playerid][pLevel] =+ 1;
new string[126];
format(string, sizeof(string), "You have bought level %d", PlayerInfo[playerid][pLevel]);
scm(playerid, -1, string);
return 1;
}

CMD:flip(playerid, params[])
{
if(PlayerInfo[playerid][pLevel] < FLIP_LEVEL) return scm(playerid, -1, "Your level isn't high enough to use this command.");
// rest of cmd //
return 1;
}
Reply
#3

Ok thank you for the script i am now working off it and i understood the whole thing
Reply
#4

i didnt want to make another topic but ive got one problem in my teleports i put so i can teleport with vehicle but in chat it keeps showing SERVER:Unknown Command even though i teleported
Reply
#5

Use return 1; in that case
Reply
#6

Omg i didnt realise that thank you how could i miss something simple like that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)