View Full Version : How to show total Moneybags and reactions won

19/08/2017, 02:18 PM
Hey guys,
Here are the two FSs of reaction test and moneybag

I would like to know how we can show the total moneybags and total reactions won by a player.
Currently it only shows the the "player() has found moneybag hidden in location ...."
I would like to make it " Player() has found the (number of moneybag) hidden in the location..."
For ex: - "Rohit has found his 200th moneybag hidden in Las venturas"

Also the same with reaction.

"Rohit has won his 100th reaction" like that..

Conclusion is ,show the player the total number of mb or reaction won by a player.
It would be fine if i was able to add it to the /stats cmd too :)


19/08/2017, 02:33 PM
You would have to create a variable which adds 1 to it when the player finds the moneybag and then save it using your saving system. The below is just an example only!

At the top of your script or in your enum where your user data is in (remove MAX_PLAYERS if thats the case)
new pMoneyBagsFound[MAX_PLAYERS];

When a player picks up the money bag

You can then use pMoneyBagsFound[playerid] in a message to show!

new string[144];
format(string, sizeof(string), "[playername] has found his %i moneybag!", pMoneyBagsFound[playerid]);
SendClientMessageToAll(-1, string);

19/08/2017, 03:45 PM
Thats not a good solution i guess, I didn't understand,sorry my low knowledge maybe :(

If someone can add the right lines to script, it would be helpful and i will rep+ him.
Im using LuxAdmin so my saving system must be that .

20/08/2017, 06:30 PM
Cmon help me guys!

20/08/2017, 06:31 PM
I'm sorry man but I won't code you the whole thing just for a +rep.

21/08/2017, 05:37 PM
I'm sorry man but I won't code you the whole thing just for a +rep.

First of all I didn't ask to get me the whole code, atleast a good explanation would be fine.

Hope you know im a beginner scripter and i would not understand little explanations. Thats why i requested for a good help hoping anyone will find it for me :)

So i request another scripters to just explain how this can be done and how it can be added to /stats cmd too.
Is the saving system is the users destination in scriptfiles ?

PLease help me out.
Thank you.

24/08/2017, 05:59 AM
In your LuxAdmin saving / loading part you create a variable (and in database too if needed), that variable will contain the amount of bags / reactions.

Once a player gets one of them, up the variable by one, for example:

pInfo[playerid][MoneyBab]++; (if you store all player related stuff in this way).

That's basicly all, i never saw that admin filterscript, as I started from sratch, but this is the idea on how to do it