[FilterScript] Wallet [Y_INI][ZCMD]
#1

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:
  • 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.
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
Reply
#2

Something new, I like it.
Reply
#3

- 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.
Reply
#4

I will take a look.

Good contribution.
Reply
#5

Try to optimize it more to the next, same good work
Reply
#6

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

Inspiring nice work
Reply
#8

Nice work
Reply
#9

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


Forum Jump:


Users browsing this thread: 2 Guest(s)