SA-MP Forums Archive
[FilterScript] Wallet [Y_INI][ZCMD] - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Wallet [Y_INI][ZCMD] (/showthread.php?tid=659180)



Wallet + Robbery [Y_INI][ZCMD][BETA] - KayJ - 26.09.2018

Wallet + Robbery [Y_INI] [ZCMD] [BETA v0.2]
About:
This is a concept script means I made this purely based on my concept, I tried to keep it simple and unique, you have any improvement you can let me know.

Concept of Working:
Here's my concept of how wallet should be in RPG/CnR servers; A person gets wallet on registration where he can hold all money he have in HUD but wallet can be looted by robbers(other players)[prevent this by depositing it in bank]. If a robber robs player's money then he will have 30 seconds(default/assumed) to run from player from getting killed. If robber gets killed by player then player will get his money+wallet+robber's wallet(with money)[Only 1 wallet can be there whole time so no 2 wallets]
which is clear that robber's death will loose them their money and wallet. If robber tries to disconnect during that period then robber will loose their money + wallet and player will get his wallet back with no money in it(only if he didn't buy new one). Also if robber gets kicked/banned then player will get his wallet+his money+robber's money(also wallet but can't have more than 1). [No TL; DR cause it took time to write this]

Commands:
Code:
/rob (random 10 tries - actually no. Only even number tries will be success)
/buywallet - 100$(default)
/wallet - money in HUD (useless command)
/givewallet - Give wallet to player [RCON] (BETA v0.2)
/revokewallet - Remove/Take wallet from player [RCON] (BETA v0.2)
Saving: Other Implementations(to be added by user): ChangeLog:
Quote:

BETA v0.2
  • Improvement in /rob command [unstable sometimes with playerid (s)]
  • Added some RCON commands to /givewallet and /revokewallet
  • Loaduser was missing with some loading function which is added.
  • ClientMessage lines are reduced at some places.
Download:
Github

Requirement:
sscanf | YSI 4.0.2 ~ ******
ZCMD ~ Zeex


Re: Wallet [Y_INI][ZCMD] - XStormiest - 26.09.2018

Something new, I like it.


Re: Wallet [Y_INI][ZCMD] - Infin1ty - 26.09.2018

- Try to put everything in an enumerator.
- Maybe go with SQLite rather than ini?
- Foreach may better suit rather than GetPlayerPoolSize, considering that most gamemodes have foreach implemented anyway.
- Most of your code will not work as you created 'targetid' and not assigned a playerid to it (it'll constantly retrieve player id 0's position and string). This is specifically in your rob command.


Re: Wallet [Y_INI][ZCMD] - Alexis17 - 26.09.2018

I will take a look.

Good contribution.


Re: Wallet [Y_INI][ZCMD] - Kaponi - 26.09.2018

Try to optimize it more to the next, same good work


Re: Wallet [Y_INI][ZCMD] - NoahF - 26.09.2018

Not bad at all, a fresh idea, however could use some better optimization, but keep at it!


Re: Wallet [Y_INI][ZCMD] - RxErT - 28.09.2018

Inspiring nice work


Re: Wallet [Y_INI][ZCMD] - NikhilMeena - 29.09.2018

Nice work


Re: Wallet [Y_INI][ZCMD] - Kane - 29.09.2018

This is far from nice work. People really gotta stop encouraging subpar releases just to boost up their post count.