[REQ]Dontator Points(VIP Tokens)
#1

So-.. As you may have read from the title.. I need someone to script me a donator points system.

The thing I want it to do:
Name of the points: VIP Tokens
So like the rcon cmd to give tokens is: /givetokens

I would also like menu made where you can spend these points on things.. But for now all i want anybody to be able to buy is a name change for 50 Tokens.

And the last thing, I would like a /stats command that shows how many tokens you have.

If someone could script that.. That would be amazing! <3
Reply
#2

C'Mon dude!! Take a look at this http://pastebin.com/Psthdkvb I made one for you. For now, I din't add that exchange points for something else, but using /givetokens [playerid] [tokens] you can give a player desired amount of tokens.

Reason for not making a command directly to deduct tokens on changing name is : You may have custom name command on your GM and I don't want to mess with that. And moreover I don't really like to increase lines of code for that, Coz' we can simply give a player tokens and change their name with pre-defined command which is almost in any gamemode. So name changing with token deduction is not a problem.

Now, About exchanges, You mentioned thats not necessary for now. I hope you'll like the script.

If any probs, contact me @ ******** or Skype which I mentioned in my signature.

BTW, If you decide to use my work, I mean Filterscript , Don't forget to create older named 'Tokens' in scriptfiles folder.
Reply
#3

Thank you so much man <3.. but one more thing.. can you tell me how to make command that use these tokens?
Like say I have a shop and want to add a command in that shop "/buy sultan".. how would I script it so you can only buy the sultan with Tokens?
Reply
#4

Well, Simple, Just do a command to give the player as usual but check whether the player had required amount tokens with 'if' statement. If he do have tokens and proceed to buy, Just add
Код:
new currentoks = PlayerInfo[playerid][ptokens];
PlayerInfo[playerid][ptokens] = currentoks - some tokens // No.of tokens you want to deduct.
new INI:File = INI_Open(UserPath(TarID));
INI_SetTag(File, "VIP Tokens");
INI_WriteInt(File,"Tokens:", PlayerInfo[TarID][ptokens]);
INI_Close(File);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)