Aboodealtikrity Posted March 3, 2015 Share Posted March 3, 2015 Have A nice Day my friends i wish if some one say to me if the player quit from the job what is the function to back the player to his original skin ?? And this is From Releases Resources not Leaked i used this command but there are wrong Field to call mysql:escape_string [string"?"] function quit( p, f) if ( player and isElement ( p) and getElementType ( p) == 'p' ) then if ( f== nil ) then f= true end local data = mysql:escape_string("SELECT * FROM characters WHERE skin='" .. mysql:escape_string(skin) .. "' AND account='" .. mysql:escape_string(id) .. "' AND cked = 0") local job= getElementData ( p, "Job" ) local rank = getElementData ( p, "Job Rank" ) setElementData ( p, "Job", "civilian" ) if ( isPedInVehicle ( p) ) then removePedFromVehicle ( p) end local skin = tonumber ( getElementData ( p, "User.CivilianSkin" ) ) if ( not skin ) then setElementData ( p, "User.CivilianSkin",data) end triggerClientEvent ( p, "onPlayerResign", player, job, rank, data) local skin = tonumber(data["skin"]) setPedSkin(source, skin) end end i know its bad because im new thank you Link to comment
Castillo Posted March 3, 2015 Share Posted March 3, 2015 Do you have a resource called "mysql" and is it running? Link to comment
Aboodealtikrity Posted March 3, 2015 Author Share Posted March 3, 2015 yes sure i have but i think i have many Wrong in this 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