UserToDelete Posted May 30, 2015 Share Posted May 30, 2015 (edited) Bueno, hola de nuevo a todos, con un gran HUUUUUUUUUUG (Fuera cocaina) Bueno, el problema que tengo es que no DESTRUYE el sonido ni el objeto, pero si los crea y los reproduce Client: HUUUUUUUUUUUUUUUUUG function creator (obj, link) if obj ~= nil and link ~= nil then local x,y,z = getElementPosition(obj) local soundBeet = playSound3D(link,x,y,z,false) setSoundMaxDistance(soundBeet, 50) attachElements(obj, soundBeet) end end addEvent("f5client:create", true) addEventHandler("f5client:create", root, creator) function onSpeakStop (OBJECT) for k,v in ipairs(getAttachedElements(OBJECT)) do destroyElement(v) end destroyElement(OBJECT) outputChatBox("Cumplidad") end addEvent("f5client:stop", true) addEventHandler("f5client:stop", root, onSpeakStop) Server: addEvent("f5:create", true) addEvent("f5:destroy", true) objecT = {} function create (link) local x,y,z = getElementPosition(client) if link ~= nil then objecT[client] = createObject(2229,x,y+2,z) triggerClientEvent(root, "f5client:create", root, objecT[client], link) end end addEventHandler("f5:create", root, create) function destroy () -- for k,v in ipairs(getAttachedElements(objecT[client])) do -- destroyElement(v) -- end triggerClientEvent(root, "f5client:stop", root, objecT[client]) --destroyElement(objecT[client]) objecT[client] = nil end addEventHandler("f5:destroy", root, destroy) function quit() if objecT[source] ~= nil then triggerClientEvent(root, "f5client:stop", root, objecT[source]) end end addEventHandler("onPlayerQuit", root, quit) Edited June 1, 2015 by Guest Link to comment
UserToDelete Posted May 30, 2015 Author Share Posted May 30, 2015 Si, aparece cumplidad, pero 0 errores ni warnings Link to comment
Tomas Posted May 30, 2015 Share Posted May 30, 2015 ¿En cuál side fueron creados los elementos? Returns true if the element was destroyed successfully, false if either the element passed to it was invalid or it could not be destroyed for some other reason (for example, clientside destroyElement can't destroy serverside elements). Link to comment
UserToDelete Posted June 1, 2015 Author Share Posted June 1, 2015 ¿En cuál side fueron creados los elementos?Returns true if the element was destroyed successfully, false if either the element passed to it was invalid or it could not be destroyed for some other reason (for example, clientside destroyElement can't destroy serverside elements). Nada mejor como un copypaste de la wiki Solucionado tomas Link to comment
Recommended Posts