Jump to content

pedclothes


boro

Recommended Posts

Hi all i have script from comunity cjpedcustomer and in log see this warning

[2013-07-25 13:02:22] WARNING: cjcustomer/cjcustomer_s.lua:17: Bad argument @ 'addPedClothes'

what is bad ?

root = getRootElement () 
players = {} 
players = getElementsByType ( "player" ) 
  
function applyClothing ( incredibleTable ) 
    if getElementModel ( source ) ~= 0 then 
         setElementModel ( source, 0 ) 
    end 
    count = 0 
    while count ~= 9 do 
        local c = count 
        if(c > 3) then c = c+9 end 
        if tostring(incredibleTable[count].storedValue) == "x" then 
            removePedClothes ( source, c ) 
        elseif tostring(incredibleTable[count].storedValue) ~= "" then --blank fields do nothing 
            local texture, model = getClothesByTypeIndex ( c, tostring(incredibleTable[count].storedValue) ) 
            addPedClothes ( source, texture, model, c )  
            --outputChatBox ( "texture: "..texture.."       model: "..model.."       count: "..count ) 
        end 
        count = count + 1 
    end 
    if tostring(incredibleTable[9].storedValue) ~= "" then 
        setPedStat ( source, 21, incredibleTable[9].storedValue ) 
        --outputChatBox ( "Fat stuff triggered" ) 
    end 
    if tostring(incredibleTable[10].storedValue) ~= "" then 
        setPedStat ( source, 23, incredibleTable[10].storedValue ) 
        --outputChatBox ( "Strong stuff triggered" ) 
    end  
end 
addEvent("applyClothes", true, "incredibleTable" ) 
addEventHandler("applyClothes", getRootElement(), applyClothing) 

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