SA-MP Forums Archive
Need idea for fridge - 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: Need idea for fridge (/showthread.php?tid=387785)



Need idea for fridge - Larry123 - 26.10.2012

Hello,

I am planning to do fridge for house. Stats are from mysql. I want that the "fridge" is useable only near to fridge in the house interior. So which is better way to do?

I make new table to mysql and write these stats:

Код:
ID
PosX
PosY
PosZ
Pizza
Hotdog
Vodka
Beer
etc.
OR it is better to add these stats to my table which is made for house:

Код:
House stats here..
FridgeX
FridgeY
FridgeZ
Pizza,
Vodka,
Beer
etc.
I hope you understood. So the question is, is better to make new table or add fridge stats to table which is made for house?


Re: Need idea for fridge - Calabresi - 26.10.2012

Adding fridge stats to table which made for house sounds better, because you'll need each object's coordinates in the way you doing it.


Re: Need idea for fridge - Larry123 - 26.10.2012

Mm oke, and then i just add Fridge position and stuff into house table and is it the best solution for fridge? :P


Re: Need idea for fridge - Calabresi - 26.10.2012

Yeah, because you'll need IsPlayerInRangeOfPoint code to check if player is near fridge.