11.08.2012, 21:48
Not sure if this would be the correct section since its Mysql help but it does involve scripting so my problem I am making a VIP lounge and locker and I am trying to save the location of it using this stock that I made:
I made the row in Mysql and I made every column I need but for some reason it won't save anything. I made sure to use the stock in my save data command and I load the data when the server starts but after every server restart I have to replace the lounge and the Mysql tables are empty. If you need any other code just tell me, any help is appreciated.
Код:
stock saveLounge() { format(szLargeString, sizeof(szLargeString), "UPDATE viplounge SET VIPLoungeExtX = '%f', VIPLoungeExtY = '%f', VIPLoungeExtZ = '%f', VIPLoungeIntX = '%f', VIPLoungeIntY = '%f', VIPLoungeIntZ = %f'", VIPLoungeExt[0], VIPLoungeExt[1], VIPLoungeExt[2], VIPLoungeInt[0], VIPLoungeInt[1], VIPLoungeInt[2]); format(szLargeString, sizeof(szLargeString), "%s, VIPLoungeVW = '%d', VIPLoungeIntID = '%d', VIPLoungeExtVW = '%d'", szLargeString, VIPLoungeVW, VIPLoungeIntID, VIPLoungeExtVW); format(szLargeString, sizeof(szLargeString), "%s, VLockerX = '%f', VLockerY = '%f', VLockerZ = '%f', VLockerVW = '%d', VLockerInt = '%d' WHERE loungeid = '1'",szLargeString, VLockerPos[0], VLockerPos[1], VLockerPos[2], VLockerVW, VLockerInt); mysql_query(szLargeString); return 1; }