iFoReX Posted February 24, 2013 Share Posted February 24, 2013 Porque se me ven 2 peds ? como lo soluciono ? createTeam("Ladrones",255,145,0) createTeam("Servicio Secreto",0,255,255) createTeam("Marinos",0,255,0) createTeam("Pandilleros",255,255,0) createTeam("Ejercito",0,0,255) addEvent("camaras",true) addEventHandler("camaras",root,function() setCameraMatrix(source,-2193.51563, -142.11586, 54.52663,-2193.48828, -135.52185, 54.52663) local dims = math.random(100,65535) setElementDimension(source,dims) setElementData(source,"spawn","lobby",true) end ) addEventHandler("onClientResourceStart",resourceRoot,function() triggerServerEvent("camaras",getLocalPlayer()) bindKey ("enter", "down", Spawn ) bindKey ("arrow_l", "down", Next_team) bindKey ("arrow_r", "down", Previous_team) addEventHandler("onClientRender",root,texto) end ) function Spawn() end function Next_team() end function Previous_team() end function texto() local dim = getElementDimension(getLocalPlayer()) ped = createPed(287,-2193.48828, -135.52185, 54.52663) setElementRotation(ped,0,0,90) setElementDimension(ped,dim) local x,y,z = getElementPosition(ped) g_ground = createObject( 7474, x, y, z - 1.02, 0, 0, 90 ) setElementDimension(g_ground,dim) setElementAlpha(g_ground,0) end addCommandHandler("parar",function() setCameraTarget(getLocalPlayer()) end) Link to comment
Alexs Posted February 24, 2013 Share Posted February 24, 2013 Ninguna de las funciones de la función 'texto' necesita actualización en cada frame, por lo tanto "onClientRender" es innecesario. PD: Si, también es el motivo de tu problema. Link to comment
Recommended Posts