SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 26/09/2018, 08:40 AM   #1
KayJ
Gangsta
 
KayJ's Avatar
 
Join Date: Apr 2014
Posts: 678
Reputation: 64
Flowers Wallet + Robbery [Y_INI][ZCMD][BETA]

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

Last edited by KayJ; 17/05/2020 at 07:55 AM.
KayJ is offline   Reply With Quote
Old 26/09/2018, 08:59 AM   #2
XStormiest
Gangsta
 
Join Date: Jun 2012
Location: Continent: Europe, Country: Romania, City: Buzau
Posts: 558
Reputation: 46
Default Re: Wallet [Y_INI][ZCMD]

Something new, I like it.
__________________
XStormiest is offline   Reply With Quote
Old 26/09/2018, 03:51 PM   #3
Infin1ty
Banned
 
Join Date: Feb 2018
Posts: 117
Reputation: 52
Default Re: Wallet [Y_INI][ZCMD]

- 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.
Infin1ty is offline   Reply With Quote
Old 26/09/2018, 08:17 PM   #4
Alexis17
Little Clucker
 
Join Date: Nov 2017
Posts: 27
Reputation: 0
Default Re: Wallet [Y_INI][ZCMD]

I will take a look.

Good contribution.
Alexis17 is offline   Reply With Quote
Old 26/09/2018, 08:46 PM   #5
Kaponi
Big Clucker
 
Kaponi's Avatar
 
Join Date: Mar 2017
Location: Venezuela
Posts: 110
Reputation: 9
Default Re: Wallet [Y_INI][ZCMD]

Try to optimize it more to the next, same good work
__________________
-#LEAN
Kaponi is offline   Reply With Quote
Old 26/09/2018, 10:23 PM   #6
NoahF
Gangsta
 
NoahF's Avatar
 
Join Date: Jul 2012
Location: USA
Posts: 864
Reputation: 38
Default Re: Wallet [Y_INI][ZCMD]

Not bad at all, a fresh idea, however could use some better optimization, but keep at it!
NoahF is offline   Reply With Quote
Old 28/09/2018, 06:12 PM   #7
RxErT
Huge Clucker
 
Join Date: May 2016
Location: SA:MP Lemon
Posts: 243
Reputation: 12
Default Re: Wallet [Y_INI][ZCMD]

Inspiring nice work
RxErT is offline   Reply With Quote
Old 29/09/2018, 06:36 AM   #8
NikhilMeena
Banned
 
Join Date: Sep 2018
Location: India
Posts: 6
Reputation: 7
Default Re: Wallet [Y_INI][ZCMD]

Nice work
NikhilMeena is offline   Reply With Quote
Old 29/09/2018, 07:17 AM   #9
Kane
Gangsta
 
Kane's Avatar
 
Join Date: Sep 2012
Posts: 822
Reputation: 130
Default Re: Wallet [Y_INI][ZCMD]

This is far from nice work. People really gotta stop encouraging subpar releases just to boost up their post count.
__________________
Los Santos Roleplay - Developer
@ls-rp.com

Former Beta Tester

Kane is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wallet system ahameed4755 Scripting Help 1 29/08/2015 01:53 PM
Serious help needed. (ZCMD & Y_INI) SilencedPistol Scripting Help 1 23/04/2013 12:26 PM
ZCMD & Y_INI help blackwave Help Archive 1 11/01/2011 07:37 PM
[FilterScript] [FS]Wallet MatrixBoY Filterscripts 18 26/08/2009 03:10 PM


All times are GMT. The time now is 03:51 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.