Help with system
#1

Hi, I did the fishing system, and do not really understand how to make the calculation .. let's say I have 30 fish, one fish 0.5Eur price. How to calculate how much money a player receives in total, as well as the amount he paid.
Reply
#2

As you said o.5 Euro per fish right ? So you can think of 200$ Or More Per Fish
So make a variable like so
PHP код:
new fish;[The Amount of fishes player has
You can also make a enum if you wanna save it
Ok so to calculate the amount you can do something like this
PHP код:
CMD:fishsell(playerid,params[])
{
//Some Message to tell play that he sold his fishes 
SetPlayerMoney(playerid,GetPlayerMoney(playerid) + 200 fish); 
// This is give the player money 200 multiplied by how many fishes he has 

NOTE :- This is just a example for you to understand how can you make it
Reply
#3

Oo thanks man, its very good example.. I do it on gui and fully automatic ))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)