[HELP] Sync Mod Garages with Server Sided Money
#1

Iv'e been searching forever around the forums on how to sync the Mod Garages with server sided money to make it actually take money from you, but have no luck. Does anybody know if it's possible, and if so, how?

Thank you.
Reply
#2

Well, think about it like this.
You have a mod garage that's designed to subtract money from the moneybar
That mod garage is inside it's own interior
So why not just include a section in your code that's only applicable in the Mod garage int that will store the amount of money you have when you enter the int, and then sync with the moneybar after you leave?

i can write you a demo code - i'll have to look up the ints n stuff
Reply
#3

Quote:
Originally Posted by Rob_Maate
Посмотреть сообщение
Well, think about it like this.
You have a mod garage that's designed to subtract money from the moneybar
That mod garage is inside it's own interior
So why not just include a section in your code that's only applicable in the Mod garage int that will store the amount of money you have when you enter the int, and then sync with the moneybar after you leave?

i can write you a demo code - i'll have to look up the ints n stuff
That will not work, server sided money is scripted to make your money bar stay at the amount of money you have in your user file. Thus, when the garage takes money from the money bar, it will just rise back to the original amount you had.
Reply
#4

No mate, you add a special return clause that states if the player is in a certain interior, and the money bar money does not rise above the scripted money, that changes are permitted.

Did you write your script yourself?
Reply
#5

Quote:
Originally Posted by Camacorn
Посмотреть сообщение
That will not work, server sided money is scripted to make your money bar stay at the amount of money you have in your user file. Thus, when the garage takes money from the money bar, it will just rise back to the original amount you had.
His idea may work. Your 'server sided money' is a script, right?
Reply
#6

Quote:
Originally Posted by Rob_Maate
Посмотреть сообщение
No mate, you add a special return clause that states if the player is in a certain interior, and the money bar money does not rise above the scripted money, that changes are permitted.

Did you write your script yourself?
Yes, my server is 100% scratch, it is only 40% done which is why i am trying to resolve the issue before it is finished. I am not an idiot when it comes to scripting, i have just never done anything Mod Garage related before.
Reply
#7

No, never said you were an idiot lmao - you just overlooked something rather basic, happens to the best of us.


Interior || Universe ID || X || Y || Z || Description || Location

Loco Low Co. || 2 || 616.7820 || -74.8151 || 997.6350 || Modding shop || Los Santos
Wheel Arch Angels || 3 || 615.2851 || -124.2390 || 997.6350 || Modding shop || San Fierro
Transfender || 1 || 617.5380 || -1.9900 || 1000.6829 || Modding shop || LS, SF, LV

Source: SA-MP Wiki



So your code would need to check if the player was within an area around those points + interiors.
If you like I can type one up for you, you just need to insert it wherever you

pawn Код:
ResetPlayerMoney(playerid);
GivePlayerMoney(/*<script money variable*/);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)