Jump to content

Export System


0xCiBeR

Recommended Posts

  • MTA Team
Posted

Bueno estoy creando un sistema de Exports para simplificar las cosas con mi servidor.

Esto estaria bien?

PD: Obiamente Jugador lo defino cuando mando el export

function obtenerDatos(jugador) 
local cuenta = getPlayerAccount( jugador ) 
local datos = getAllAccountData( cuenta ) 
       for k,v in pairs ( datos ) do 
       outputChatBox(k..": "..v) 
       return k,v 
       end 
end   

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
Posted

Ese 'return' cancelara el for-loop, porque no envias la tabla 'datos' y haces el loop luego?

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.

  • MTA Team
Posted

Vale asi:

  
function obtenerDatos(jugador) 
local cuenta = getPlayerAccount( jugador ) 
local datos = getAllAccountData( cuenta ) 
return datos 
       for k,v in pairs ( datos ) do 
       outputChatBox(k..": "..v) 
       end 
end  
  

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
Posted

No puede haber nada despues del 'return'.

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.

  • MTA Team
Posted

Ya capte..Gracias solid

function obtenerDatos(jugador) 
local cuenta = getPlayerAccount( jugador ) 
local datos = getAllAccountData( cuenta ) 
       for k,v in pairs ( datos ) do 
       outputChatBox(k..": "..v) 
       end 
return datos 
end 

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
  • Recently Browsing   0 members

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