Wallet [Y_INI] [ZCMD]
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)
- Wallet Status (1 or 0)
- Cash (if Wallet is 1)
- Cash = 0 (if Wallet is 0)
Other Implementations(to be added by user):
- Spawn to last location if player gets crashed also make player wait for robber to join back in order to recover money. Tutorial by SmiT
- Make robber loose money if player left server(/q).
- Save Stats command (for RCON/players).
- Give wallet on connect.
Download:
wallet.pwn: Pastebin | RAW
sscanf | YSI 4.0.2 ~ Y_Less
ZCMD ~ Zeex