Jump to content

export


Sasu

Recommended Posts

Posted

Y como paso argumentos como player, element, etc? Y me podes explicar un poco mejor el return?

Posted

Por ejemplo:

function getPlayerGang ( player, gangName ) 
local gangName = getElementData ( player , "gang") 
end 
  
function exportedOtherScript(thePlayer) 
export.gang_system:getPlayerGang( thePlayer, "test") 
end 
  

Eso estaria bien?

Posted

Si, pero te falta devolver el valor:

function getPlayerGang ( player ) 
    return getElementData ( player , "gang") 
end 
  
function exportedOtherScript ( thePlayer ) 
    gang = export.gang_system:getPlayerGang ( thePlayer ) 
end 

Posted

Y si quiero que la funcion sea buscar a un gang x nombre (getGangFromName) como deberia agregar el segundo argumento?

  • Recently Browsing   0 members

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