iFoReX Posted July 17, 2012 Posted July 17, 2012 que esta malo ? la verdad no recuerdo como usar unpack addEventHandler("onClientRender",root, function() local table = {{255,0,0},{0,255,0},{0,0,255},{255,255,0},{0,255,255},{255,255,0},{0,0,0}} dxDrawText("http://bhzserver.tuars.com",0.0,571.0,198.0,599.0,tocolor(setTimer(unpack[math.random(#table)],2000,0)),0.5,"bankgothic","left","top",false,false,false) dxDrawText("Visit :",0.0,549.0,60.0,572.0,tocolor(255,255,255,255),0.7,"pricedown","left","top",false,false,false) end )
Castillo Posted July 17, 2012 Posted July 17, 2012 El unpack esta bien, pero el setTimer no tiene sentido. local colores = { { 255, 0, 0 }, { 0, 255, 0 }, { 0, 0, 255 }, { 255, 255, 0 }, { 0, 255, 255 }, { 255, 255, 0 }, { 0, 0, 0 } } setTimer ( function ( ) r, g, b = unpack ( colores [ math.random ( #colores ) ] ) end ,2000, 0 ) addEventHandler ( "onClientRender",root, function ( ) dxDrawText ( "http://bhzserver.tuars.com",0.0,571.0,198.0,599.0,tocolor(r,g,b,255),0.5,"bankgothic","left","top",false,false,false) dxDrawText ( "Visit :",0.0,549.0,60.0,572.0,tocolor(255,255,255,255),0.7,"pricedown","left","top",false,false,false) end )
iFoReX Posted July 17, 2012 Author Posted July 17, 2012 Se queda en negro solid, ademas da problema rojo en Debugscript 3 : ERROR : logoW/logo.lua:14: attempt to index global unpack( a function value ).
Castillo Posted July 17, 2012 Posted July 17, 2012 Oh, me olvide de otra cosa, es que estoy en otra cosa por eso .
iFoReX Posted July 17, 2012 Author Posted July 17, 2012 Muchas gracias solid funciona 100% me ayudarias con esto ?, no me aparece el rango en el scoreboard exports.scoreboard:addScoreboardColumn('Rango') setTimer( function () for p,v in ipairs ( getElementsByType("player") ) do local zK = getElementData(v,"Zombie Kills") if 'zK' >= '10' and 'zK' <= '50' then local novicio = setElementData(v,"Rango","Novicio") elseif 'zK' > '50' and 'zK' <= '100' then local amateur = setElementData(v,"Rango","Amateur") elseif 'zK' > '100' and 'zK' <= '150' then local kN = setElementData(v,"Rango","Killer Novicio") elseif 'zK' > '150' and 'zK' <= '200' then local kA = setElementData(v,"Rango","Killer Amateur") elseif 'zK' > '200' and 'zK' <= '250' then local k = setElementData(v,"Rango","Killer") end end end,1000,0)
Castillo Posted July 17, 2012 Posted July 17, 2012 Talvez sea porque estas verificando si el string 'zK' es mayor o igual que, quita los apostrofes.
Castillo Posted July 17, 2012 Posted July 17, 2012 El nombre del dato de las kills del recurso "zombies" es: "Zombie kills", no "Zombie Kills".
Alexs Posted July 18, 2012 Posted July 18, 2012 Te paso el mio, editalo https://community.multitheftauto.com/index.php?p= ... ls&id=5236 Lo subi para que no sea original en tu server y todos lo usen
iFoReX Posted July 18, 2012 Author Posted July 18, 2012 ahora, que esta mal en esto ? exports.scoreboard:addScoreboardColumn('Clan') addEventHandler("onPlayerSpawn",root,function(thePlayer) local account = getPlayerAccount(thePlayer) local accName = getAccountName ( account ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) then setAccountData(account,"Clan","BKZ Clan") elseif not isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) then setAccountData(account,"Clan","Civil") end end )
Alexs Posted July 18, 2012 Posted July 18, 2012 Nada, pero la Scoreboard usa Element Data no account Data: exports.scoreboard:addScoreboardColumn('Clan') addEventHandler("onPlayerSpawn",root,function(thePlayer) local account = getPlayerAccount(thePlayer) local accName = getAccountName ( account ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) then setAccountData(account,"Clan","BKZ Clan") setElementData(source,"Clan","BKZ Clan") elseif not isObjectInACLGroup ("user."..accName, aclGetGroup ( "bkz" ) ) then setAccountData(account,"Clan","Civil") setElementData(source,"Clan","Civil") end end )
Recommended Posts