Transfender and Pay 'n' Spay help!!!! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Transfender and Pay 'n' Spay help!!!! (
/showthread.php?tid=564116)
Transfender and Pay 'n' Spay help!!!! -
Sc0pion - 19.02.2015
Fixed!
Re: Transfender and Pay 'n' Spay help!!!! -
bensmart469 - 19.02.2015
You could check if the player loses $100 in a pay n spray, and check if they are in a pay n spray range. If they are, use your server-sided money function.
As for transfender, there's a function called OnVehicleMod I believe. Simply choose the component ID and charge the necessary price.
Re: Transfender and Pay 'n' Spay help!!!! -
Sc0pion - 19.02.2015
Fixed!
Re: Transfender and Pay 'n' Spay help!!!! -
CalvinC - 19.02.2015
You could create a 1 sec timer or so, with a player loop, to check if a player is in range of a transfender or pay'n'spray with
IsPlayerInRangeOfPoint, and then check if the player's money is lower than the server-side money, if so, set the server-side money to the player's money.
Re: Transfender and Pay 'n' Spay help!!!! -
Abagail - 19.02.2015
Having a 1-second timer and checking their position, and comparing it can be intensive, and create lag. (It could maybe work using a
threaded plugin, but SA-MP / PAWN isn't threaded.).
Just save vehicle modification / health data, and then when it changes, check if their health also has lost $100 or whatever(and also maybe near the according shop type).
Re: Transfender and Pay 'n' Spay help!!!! -
Sc0pion - 01.03.2015
Fixed!