Jump to content

[Help] Excuseme ! ?


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...