How to show total Moneybags and reactions won
#1

Hey guys,
Here are the two FSs of reaction test and moneybag
https://sampforum.blast.hk/showthread.php?tid=273981
https://sampforum.blast.hk/showthread.php?tid=150274

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

Regards,Rohit
Reply
#2

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!

Code:
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
pMoneyBagsFound[playerid]++;

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);
Reply
#3

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

Cmon help me guys!
Reply
#5

I'm sorry man but I won't code you the whole thing just for a +rep.
Reply
#6

Quote:
Originally Posted by TheCman
View Post
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.
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)