NiKo_15 Posted May 16, 2013 Share Posted May 16, 2013 Hola.....Me Gustaria Crear Un Script Para Que 2 o Mas Objetos Se Muevan Por Un Solo Cmd. Saludos y Espero Que Me Puedan Ayudar. Link to comment
Castillo Posted May 16, 2013 Share Posted May 16, 2013 Simplemente move ambos dentro de la misma funcion. Link to comment
Castillo Posted May 16, 2013 Share Posted May 16, 2013 addCommandHandler ( "move", function ( ) moveObject ( argumentos ) moveObject ( argumentos ) end ) Link to comment
NiKo_15 Posted May 16, 2013 Author Share Posted May 16, 2013 createObject 1 ( 3080, 2492.6999511719,-1667.6999511719,13.60000038147, 0, 0, 0) createObject 2 ( 3080, 2488.6000976563,-1667.6999511719,13.60000038147, 0, 0, 0) isMoved = false function(player) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("PDz")) then if not isMoved then moveObject (1, 3000, 2492.6999511719,-1667.6999511719,13.60000038147, 0, 0, 0) moveObject (2, 3000, 2488.6000976563,-1667.6999511719,13.60000038147, 0, 0, 0) else moveObject (1, 3000, 2492.6999511719,-1667.6999511719,10.300000190735, 0, 0, 0) moveObject (2, 3000, 2488.6000976563,-1667.6999511719,10.300000190735, 0, 0, 0) end isMoved = not isMoved end end addCommandHandler("prueba", 1 and 2) Link to comment
Castillo Posted May 16, 2013 Share Posted May 16, 2013 Te olvidaste de definir la funcion y los objetos. Ademas de que no se puede usar numeros como variables. Link to comment
MTA Team 0xCiBeR Posted May 16, 2013 MTA Team Share Posted May 16, 2013 (edited) ob = createObject ( 3080, 2492.6999511719,-1667.6999511719,13.60000038147, 0, 0, 0) ob1 =createObject ( 3080, 2488.6000976563,-1667.6999511719,13.60000038147, 0, 0, 0) isMoved = false function mover (player) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("PDz")) then if not isMoved then moveObject (ob, 3000, 2492.6999511719,-1667.6999511719,13.60000038147, 0, 0, 0) moveObject (ob1, 3000, 2488.6000976563,-1667.6999511719,13.60000038147, 0, 0, 0) else moveObject (ob, 3000, 2492.6999511719,-1667.6999511719,10.300000190735, 0, 0, 0) moveObject (ob1, 3000, 2488.6000976563,-1667.6999511719,10.300000190735, 0, 0, 0) end isMoved = not isMoved end end addCommandHandler ("mover", mover ) Proba asi EDIT: Copia denuevo..Gracias solid Edited May 16, 2013 by Guest Link to comment
Castillo Posted May 16, 2013 Share Posted May 16, 2013 'source' no esta definido en ninguna parte. Link to comment
NIKO_19997 Posted August 18, 2013 Share Posted August 18, 2013 lo siento por no responder antes , funciona bien , muchisimas gracias a los 2 Link to comment
MTA Team 0xCiBeR Posted August 19, 2013 MTA Team Share Posted August 19, 2013 de nada (: Link to comment
GamerDeMTA Posted August 19, 2013 Share Posted August 19, 2013 'source' no esta definido en ninguna parte. yo creia que si esta pre definida en mta xq lo uso en algunos scripts y funcionan Link to comment
MTA Team 0xCiBeR Posted August 19, 2013 MTA Team Share Posted August 19, 2013 Esta predefinido cuando un evento lo trigea..EJ: "onVehicleEnter"--Ek source de este evento, es el carro al que has entrado Source: The source of this event is the vehicle that was entered. Link to comment
Recommended Posts