Jump to content

Cant Get Color To Work


Recommended Posts

"thePlayer" argument must be wrong.

Post the whole function.

function makePed(source, commandName, name, priceratio) 
    if not (name) then  
    outputChatBox("SYNTAX: /addfuelpoint name priceratio", thePlayer, 255, 194, 14) 
    else 
    local x,y,z = getElementPosition(source) 
    theNewPed = createPed (50, x,y,z) 
    exports.pool:allocateElement(theNewPed) 
    local rz = getPedRotation(source) 
    setPedRotation (theNewPed, rz) 
    setElementFrozen(theNewPed, true) 
    local data = exports.mysql:query_insert_free("INSERT INTO fuelpeds SET name='" .. name .. "', skin='" .. 50 .. "', posX='" .. x .. "', posY='" .. y .. "', posZ='" .. z .. "', rotZ='" .. rz .. "', priceratio='" .. priceratio .. "'" ) 
  
  
    --setPedAnimation(theNewPed, "FOOD", "FF_Sit_Loop",  -1, true, false, true) 
    exports['anticheat-system']:changeProtectedElementDataEx(theNewPed, "ped:name", name, true) 
    exports['anticheat-system']:changeProtectedElementDataEx(theNewPed, "ped:fuelped",true) 
     
    exports['anticheat-system']:changeProtectedElementDataEx(theNewPed, "fuel:priceratio" , priceratio or 100, false) 
     
    -- For the language system 
    exports['anticheat-system']:changeProtectedElementDataEx(theNewPed, "languages.lang1" , 1, false) 
    exports['anticheat-system']:changeProtectedElementDataEx(theNewPed, "languages.lang1skill", 100, false) 
    exports['anticheat-system']:changeProtectedElementDataEx(theNewPed, "languages.lang2" , 2, false) 
    exports['anticheat-system']:changeProtectedElementDataEx(theNewPed, "languages.lang2skill", 100, false) 
    exports['anticheat-system']:changeProtectedElementDataEx(theNewPed, "languages.current", 1, false)   
  
    return theNewPed 
     
end 
end 
addCommandHandler("addfuelpoint", makePed) 

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...