NiKo_15 Posted May 16, 2013 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.
Castillo Posted May 16, 2013 Posted May 16, 2013 addCommandHandler ( "move", function ( ) moveObject ( argumentos ) moveObject ( argumentos ) end )
NiKo_15 Posted May 16, 2013 Author 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)
Castillo Posted May 16, 2013 Posted May 16, 2013 Te olvidaste de definir la funcion y los objetos. Ademas de que no se puede usar numeros como variables.
MTA Team 0xCiBeR Posted May 16, 2013 MTA Team 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
NIKO_19997 Posted August 18, 2013 Posted August 18, 2013 lo siento por no responder antes , funciona bien , muchisimas gracias a los 2
GamerDeMTA Posted August 19, 2013 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
MTA Team 0xCiBeR Posted August 19, 2013 MTA Team 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.
Recommended Posts