~Zeus~ Posted June 4, 2012 Posted June 4, 2012 Hola a todos, mi gran compañero Elmota tiene el siguiente error con el SetElementData.*Es un Spawn System cl-side BSpawn = {} Info = {} rotation = 0 skinsSO = {161} BSpawn[1] = guiCreateButton(0.7945,0.0883,0.0852,0.03,"Special Ops",true) guiSetAlpha(BSpawn[1],0) BSpawn[2] = guiCreateButton(0.7945,0.165,0.0852,0.03,"Soldado",true) guiSetAlpha(BSpawn[2],0) BSpawn[3] = guiCreateButton(0.7945,0.2033,0.0852,0.03,"Policia",true) guiSetAlpha(BSpawn[3],0) BSpawn[4] = guiCreateButton(0.7945,0.24,0.0852,0.03,"SWAT",true) guiSetAlpha(BSpawn[4],0) BSpawn[5] = guiCreateButton(0.7945,0.2817,0.0852,0.03,"FBI",true) guiSetAlpha(BSpawn[5],0) BSpawn[6] = guiCreateButton(0.7945,0.3167,0.1008,0.0267,"SuperVivientes",true) guiSetAlpha(BSpawn[6],0) BSpawn[7] = guiCreateButton(0.8383,0.835,0.0344,0.0533,"<",true) guiSetAlpha(BSpawn[7],0) BSpawn[8] = guiCreateButton(0.9242,0.835,0.0344,0.0533,">",true) guiSetAlpha(BSpawn[8],0) BSpawn[9] = guiCreateButton(0.8531,0.9033,0.0938,0.05,"SPAWN",true) guiSetAlpha(BSpawn[9],0) Info[1] = guiCreateMemo(0.8008,0.4483,0.1922,0.2033,"",true) guiMemoSetReadOnly(Info[1],true) Info[2] = guiCreateEdit(0.8789,0.8433,0.0375,0.0383,"",true) guiEditSetReadOnly(Info[2],true) guiSetVisible(BSpawn[1],false) guiSetVisible(BSpawn[2],false) guiSetVisible(BSpawn[3],false) guiSetVisible(BSpawn[4],false) guiSetVisible(BSpawn[5],false) guiSetVisible(BSpawn[6],false) guiSetVisible(BSpawn[7],false) guiSetVisible(BSpawn[8],false) guiSetVisible(BSpawn[9],false) guiSetVisible(Info[1],false) guiSetVisible(Info[2],false) function sGUI() dxDrawText("Spawn!",1093.0,542.0,1212.0,572.0,tocolor(0,0,0,255),1.0,"bankgothic","left","top",false,false,true) dxDrawText(">",1191.0,505.0,1240.0,537.0,tocolor(0,0,0,255),1.0,"bankgothic","left","top",false,false,true) dxDrawText("<",1082.0,503.0,1113.0,529.0,tocolor(0,0,0,255),1.0,"bankgothic","left","top",false,false,true) dxDrawText("Skins",1103.0,420.0,1194.0,447.0,tocolor(0,0,0,255),1.0,"bankgothic","left","top",false,false,true) dxDrawRectangle(1007.0,414.0,272.0,185.0,tocolor(255,255,255,255),false) dxDrawText("INFORMACION",1029.0,225.0,1265.0,263.0,tocolor(0,0,0,255),1.0,"bankgothic","left","top",false,false,true) dxDrawRectangle(1007.0,219.0,272.0,190.0,tocolor(255,255,255,255),false) dxDrawText("-SuperVivientes",1017.0,189.0,1086.0,206.0,tocolor(0,0,0,255),0.5,"bankgothic","left","top",false,false,true) dxDrawText("-FBI",1017.0,168.0,1086.0,185.0,tocolor(0,0,0,255),0.5,"bankgothic","left","top",false,false,true) dxDrawText("-SWAT",1017.0,145.0,1086.0,162.0,tocolor(0,0,0,255),0.5,"bankgothic","left","top",false,false,true) dxDrawText("-Policia",1017.0,122.0,1086.0,139.0,tocolor(0,0,0,255),0.5,"bankgothic","left","top",false,false,true) dxDrawText("-Soldado",1015.0,100.0,1091.0,115.0,tocolor(0,0,0,255),0.5,"bankgothic","left","top",false,false,true) dxDrawText("Teams Publicos :",1016.0,77.0,1149.0,97.0,tocolor(0,0,0,255),0.5,"bankgothic","left","top",false,false,true) dxDrawText("-Special Ops",1011.0,54.0,1090.0,66.0,tocolor(0,0,0,255),0.5,"bankgothic","left","top",false,false,true) dxDrawText("Teams Privados :",1013.0,30.0,1129.0,51.0,tocolor(0,0,0,255),0.5,"bankgothic","left","top",false,false,true) dxDrawText("Clases :",1012.0,6.0,1262.0,30.0,tocolor(0,0,0,255),0.5,"bankgothic","left","top",false,false,true) dxDrawRectangle(1007.0,0.0,272.0,215.0,tocolor(255,255,255,255),false) end function visibleDX() addEventHandler("onClientRender",root,sGUI) guiSetVisible(BSpawn[1],true) guiSetVisible(BSpawn[2],true) guiSetVisible(BSpawn[3],true) guiSetVisible(BSpawn[4],true) guiSetVisible(BSpawn[5],true) guiSetVisible(BSpawn[6],true) guiSetVisible(BSpawn[7],true) guiSetVisible(BSpawn[8],true) guiSetVisible(BSpawn[9],true) guiSetVisible(Info[1],true) guiSetVisible(Info[2],true) showCursor(true) ped = createPed(0, 209.05439758301, 1928.8393554688, 23.2421875) setElementModel(ped, getElementData(localPlayer,"skinsSO")) end addEvent("onVisibleSGui", true) addEventHandler("onVisibleSGui", root, visibleDX) addEventHandler("onClientPlayerWasted", root, visibleDX) addEventHandler("onClientGUIClick", root, function() if source == BSpawn[1] then guiSetText(Info[1],"Grupo t�ctico encargado de terminar con la infecion.") elseif source == BSpawn[2] then guiSetText(Info[1]," Son las tropas encargadas de recuperar la Tierra debido al horrible ataque de los mutantes.") elseif source == BSpawn[3] then guiSetText(Info[1]," Las ultimas patrullas de San Andreas reunen sus fuerzas para acabar con las bestias.") elseif source == BSpawn[4] then guiSetText(Info[1],"Armados hasta los dientes, estan dispuestos a sobrevivir.") elseif source == BSpawn[5] then guiSetText(Info[1],"No se sabe que andan buscando, pero investigan la causa de la infeccion.") elseif source == BSpawn[6] then guiSetText(Info[1],"Son las ultimas personas que escaparon de la tragedia.") elseif source == BSpawn[9] then guiSetVisible(BSpawn[1],false) guiSetVisible(BSpawn[2],false) guiSetVisible(BSpawn[3],false) guiSetVisible(BSpawn[4],false) guiSetVisible(BSpawn[5],false) guiSetVisible(BSpawn[6],false) guiSetVisible(BSpawn[7],false) guiSetVisible(BSpawn[8],false) guiSetVisible(BSpawn[9],false) guiSetVisible(Info[1],false) guiSetVisible(Info[2],false) showCursor(false) removeEventHandler("onClientRender", root, sGUI) setCameraTarget(localPlayer) destroyElement(ped) end end ) function rotarPed ( ) if isElement ( ped ) then rotation = rotation + 1 if ( rotation > 359 ) then rotation = 0 end setPedRotation ( ped, rotation ) end end addEventHandler ( "onClientRender", root, rotarPed ) addEventHandler("onClientResourceStart",resourceRoot, function() setElementData(localPlayer, "SkinsSO", skinsSO) end ) sv-side triggerClientEvent(source, "onVisibleSGui", root) setCameraMatrix(source,209.12147521973, 1916.9410400391, 26.543338775635,209.05439758301, 1928.8393554688, 23.2421875) end) addEventHandler("onPlayerWasted", getRootElement(), function() setCameraMatrix(source,209.12147521973, 1916.9410400391, 209.05439758301, 1928.8393554688, 23.2421875) end ) addEventHandler("onClientResourceStart", getRootElement(), function() specialOps = createTeam("specialOps", 255,255,0) end ) Mapper y sustituidor de texturas (aprendiendo) Voluntario ~ZeuS~
Edikosh998 Posted June 4, 2012 Posted June 4, 2012 skins0 es una tabla.. setElementData(localPlayer, "SkinsSO", skinsSO[1]) WRS( World Racing Server) [server] = 8%
Alexs Posted June 4, 2012 Posted June 4, 2012 setElementData(localPlayer, "SkinsSO", skinsSO) en la variable de skinsSO debe ir el parentesis? skinsSO = {161} PD: Lindo Avatar Developer @ MYVAL
iFoReX Posted June 4, 2012 Posted June 4, 2012 bad argument set element model elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Edikosh998 Posted June 4, 2012 Posted June 4, 2012 ....Tenes que pone el setElementData en onPlayerJoin, en lo que mas te combiene. WRS( World Racing Server) [server] = 8%
iFoReX Posted June 4, 2012 Posted June 4, 2012 ya hize eso pero me sigue dando bad argument setElementModel elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Recommended Posts