Save player attached objects.
#1

Hi,

I want to save attach object when player disconnect and load when player connect. I will need model x,y,z,rx,ry,rz,px,py,pz slot. I have all that in variables. But now i'am using mysql and i don't know how now with tables. Maybe possible to create 10 tables, because 10 slots is avaible and there write information and when load read all separately. Because now i have to create for 10 slots. How i said model,slot,x,y,yz.... 12 options 12 * 10 = 120.
Reply
#2

Create 1 table like this.
PlayerName, CostumeIndex, CostumeSlot, bone, x, y, z, rx, ry, rz, px, py, pz

Then just use the right queries.

Get a specific costume
SELECT * FROM `CostumeData` WHERE `PlayerName` = '%s' AND `CostumeIndex` = index

Get all unique costumes
SELECT DISTINCT `CostumeIndex` FROM `CostumeData` WHERE `PlayerName` = '%s'
Reply
#3

But there is 9 slots, and i already have a players table where player information is i want to make there everything.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)