GuyFromPast Posted October 23, 2010 Share Posted October 23, 2010 function ResourceStart() executeSQLCreateTable("SkinID", "serial STRING,SkinID INT") end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), ResourceStart) function ClientReady(g_player) local serial = getPlayerSerial(g_player) local playername = getPlayerName(g_player) CheckPlayerChicken = executeSQLSelect ( "valimusID", "serial", "serial = '" .. serial .. "'" ) if ( type( CheckPlayerChicken ) == "table" and #CheckPlayerChicken == 0 ) or not CheckPlayerchicken then executeSQLInsert ( "SkinID", "'"..serial.."','180'" ) end end addEvent("onClientReady",true) addEventHandler("onClientReady",getRootElement(),ClientReady) function skinchange(source,SkinID) setElementModel(source, SkinID) local playername = getPlayerName(source) local serial = getPlayerSerial(source) executeSQLUpdate ( "skinchangee", "SkinID = '"..SkinID.."'","serial = '" .. serial .. "'") setElementData ( source ,"pla.number",SkinID,true) end addEvent("onSkinChange",true) addEventHandler("onSkinChange",getRootElement(),skinchange) Any ideas how to fix it ? Link to comment
Castillo Posted October 23, 2010 Share Posted October 23, 2010 if you taken this code from race starter pack (i know you did) then you edited it wrong, you are using like 3 tables with 3 different names.. that won't work of course. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now