Jump to content

[Ajuda] Função com erro


Recommended Posts

Posted

o que tem de errado nessa função ela não funciona o objetivo dela e quando eu clicar no buttão do gui e cria um Ped

o Gui foi eu que criei mais o script do ped eu baixei na comunidade

https://community.multitheftauto.com/index.php?p= ... ls&id=5491

addEvent("giveSkin", true) 
function giveSkin(p) 
    if(ablauf[p] == true) then return end 
    ablauf[p] = true 
    local x, y, z = getElementPosition(source) 
    ped[p] = createPed(147, x, y+1, z) 
    setElementData(ped[p], "TaG", getPlayerName(p) 
    setElementData(ped[p], "Ped", true) 
    pedSayTimer[ped[p]] = setTimer(doPedSaySomething, 5000, 1, ped[p]) 
    addEventHandler("onPedWasted", ped[p], function() 
        local ped = source 
        setTimer(destroyElement, 1000, 1, ped) 
        ablauf[p] = false    
    end) 
end) 
addEventHandler("giveSkin", root, giveSkin) 

Posted

Falta um parentese na função setElementData na linha 7. Além disso, tem um parentese após o 'end' na linha 15 que também causa erro na função.

Please do not PM me with scripting related question nor support, use the forums instead.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...