[FilterScript] Custom Coins Currency [Saves]
#1

System Information;
This system provides a new currency to the server and removes the old currency [Regular Money] however a lot were asking me to release this one and there we go, it's quiet simple but somehow useful. Currency of this system is called Coins, I was planning to edit it to SA Dollars or US Dollars but I had it set to coins because i'm working on a script that requires coins however it's quiet easy to edit the currency to US Dollars or something else instead of Coins.

Features
• Currency's value in textdraws.
• Saves when you leave, loads when you connect.
• Textdraws update every 500 miliseconds.
Images
V0.1



V0.2


V0.3


Notes/Bugs
Note: This system doesn't use the "GivePlayerMoney" function.
There's no bugs were found till now, I also expect no bugs to be found however if you found any bugs, feel free to post a reply with the found bug.
Frequently Asked Questions
How to give somebody coins if this system doesn't use the GivePlayerMoney function?
• Simply use this function "GiveCoins(playerid, amount);" or this one to give only a coin "GiveOneCoin(playerid);"
How does it save the coins and loads them when a player connects?
• It checks if the player file exists in the Coins folder, if it doesn't exist it creates a new one and if it exists then it loads his coins.
Saving system
You got to create a new folder in your scriptfiles called "Coins" in-order to save the coins in each account, not creating this folder will cause the saving system not to work which means it won't save any coins.
Download;
http://pastebin.com/6fBAihP4V0.1
V0.2 - Textdraws were edited and look better now.
V0.3 - Updates listed below;- A bit improved the textdraws, not sure if they look better now.
- Fixed a bug within the coins updater.
- Removed useless functions.
Reply
#2

Nice REP+
Reply
#3

NOICE
Reply
#4

Well problem might be that timer for updating textdraw when you have lots of players and other timers too..

This system is very nice tho.. gj
Reply
#5

Quote:
Originally Posted by TopShooter
View Post
Appreciated the feedback


Appreciated the feedback.



I tested it on a server with 24 players online and it's working fine, I'll use OnPlayerUpdate in the next update and remove this timer, thanks for the suggestion and feedback.
But listen.. Why don't you use timer with 1 or 2 sec update?? This will update textdraws in reasonable time but also will be better comparing to current time update..
Reply
#6

Don't use OnPlayerUpdate, It gets called 30 times in a second. Timer with 1 second update will do the job fine.
Reply
#7

Updated with a timer to avoid lag strikes when there's more players, special thanks to oMa37 and Micko123.
Reply
#8

Here is another one suggestion??
I see that you are using dini.. Change it do Yini or MySQL (but since lots of users does not know MySQL Yini is better).

Don't take this as offense. I just want to help
Reply
#9

Quote:
Originally Posted by Micko123
View Post
Here is another one suggestion??
I see that you are using dini.. Change it do Yini or MySQL (but since lots of users does not know MySQL Yini is better).

Don't take this as offense. I just want to help
And I appreciate your suggestion but I hate using the Y INI for simple filterscripts like this one to be honest . Dini isn't bad for simple filterscripts however i'm currently working on a gamemode and i'm going to use the Y Ini for this gamemode, thanks for the suggestion once more.
Reply
#10

Well that is true xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)