Custom Coins Currency [Saves] -
TopShooter - 05.11.2016
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
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;
Re: Custom Coins Currency [Saves] -
RyderX - 05.11.2016
Nice REP+
Re: Custom Coins Currency [Saves] -
Eoussama - 05.11.2016
NOICE
Re: Custom Coins Currency [Saves] -
Micko123 - 05.11.2016
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
Re: Custom Coins Currency [Saves] -
Micko123 - 05.11.2016
Quote:
Originally Posted by TopShooter
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..
Re: Custom Coins Currency [Saves] -
oMa37 - 05.11.2016
Don't use OnPlayerUpdate, It gets called 30 times in a second. Timer with 1 second update will do the job fine.
Re: Custom Coins Currency [Saves] -
TopShooter - 05.11.2016
Updated with a timer to avoid lag strikes when there's more players, special thanks to oMa37 and Micko123.
Re: Custom Coins Currency [Saves] -
Micko123 - 05.11.2016
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
Re: Custom Coins Currency [Saves] -
TopShooter - 05.11.2016
Quote:
Originally Posted by Micko123
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.
Re: Custom Coins Currency [Saves] -
Micko123 - 05.11.2016
Well that is true xD