Jump to content

Cant Get Color To Work


Recommended Posts

Posted

Well I Cant Get The Color To Work Here Is My Script

    if not (name) then  
    outputChatBox("SYNTAX: /addfuelpoint name priceratio", thePlayer, 255, 194, 14) 
    else 

This is a server-side script!

Posted

"thePlayer" argument must be wrong.

Post the whole function.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
"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) 

Posted

See? your argument name is "source" not "thePlayer"

So it has to be "source" @ outputChatBox too:

outputChatBox("SYNTAX: /addfuelpoint name priceratio", source, 255, 194, 14) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
See? your argument name is "source" not "thePlayer"

So it has to be "source" @ outputChatBox too:

outputChatBox("SYNTAX: /addfuelpoint name priceratio", source, 255, 194, 14) 

Thanks

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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