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