StanMarsh Posted July 3, 2013 Share Posted July 3, 2013 Hola, bueno vi un mod (Cleo) Que me intereso mucho para hacer un ambiente mas realista a mi server bueno el mod consiste en que al llegar a una cierta velocidad un arma dispara y entonces se podria usar create Weapon para hacer eso? Link to comment
Chaz-CR Posted July 3, 2013 Share Posted July 3, 2013 Queres poner un Cleo en el server o crear uno parecido? Link to comment
StanMarsh Posted July 3, 2013 Author Share Posted July 3, 2013 Queres poner un Cleo en el server o crear uno parecido? Parecido. Link to comment
BorderLine Posted July 3, 2013 Share Posted July 3, 2013 y usa esto para detectaar la velocidad https://wiki.multitheftauto.com/wiki/GetElementVelocity Link to comment
StanMarsh Posted July 3, 2013 Author Share Posted July 3, 2013 y usa esto para detectaar la velocidadhttps://wiki.multitheftauto.com/wiki/GetElementVelocity bueno y al detectar la velocidad como hago para que el arma dispare? y le haga el attach Link to comment
BorderLine Posted July 3, 2013 Share Posted July 3, 2013 https://wiki.multitheftauto.com/wiki/SetWeaponState Link to comment
StanMarsh Posted July 3, 2013 Author Share Posted July 3, 2013 https://wiki.multitheftauto.com/wiki/SetWeaponState Ejemplo :I? Link to comment
BorderLine Posted July 3, 2013 Share Posted July 3, 2013 no es nesesario, los argumentos estan mas que claro weap = createWeapon(... if speed > 150 then setWeaponState( weap, "firing") .. Link to comment
StanMarsh Posted July 3, 2013 Author Share Posted July 3, 2013 no es nesesario, los argumentos estan mas que claroweap = createWeapon(... if speed > 150 then setWeaponState( weap, "firing") .. me da error en la linea 1 attempt to call global "createweapon" (a nil value) Link to comment
NodZen Posted July 3, 2013 Share Posted July 3, 2013 Me imagino que no habrás copiado tal cual te lo dió Yakuza y lo pusiste en tu script... Es un ejemplo, no es el script. Link to comment
StanMarsh Posted July 3, 2013 Author Share Posted July 3, 2013 Me imagino que no habrás copiado tal cual te lo dió Yakuza y lo pusiste en tu script... Es un ejemplo, no es el script. no yo lo scriptee aqui esta el script weap = createWeapon("38") if speed > 12 then setWeaponState( weap, "firing") end Link to comment
Plate Posted July 3, 2013 Share Posted July 3, 2013 weap = createWeapon("38") if speed > 12 then setWeaponState( weap, "firing", true) end Link to comment
BorderLine Posted July 3, 2013 Share Posted July 3, 2013 eso no sera suficiente.. te falta el getelementposition el getoccupedvehicle argumentos del createweapon, y el evento que seria onclientvehicleneter Link to comment
StanMarsh Posted July 4, 2013 Author Share Posted July 4, 2013 me suige dando error .-. Probe asi: weap = createWeapon("38") if speed > 12 then setWeaponState( weap, "firing", true) end local x,y,z = getElementPosition( myCar ) -- create the minigun; weap = createObject ( 38, x, y, z + 3 ) -- attach the minigun to the car; attachElements ( samsite, myCar, 0, 0, 0 ) me suige dando error en la linea 1 Link to comment
BorderLine Posted July 4, 2013 Share Posted July 4, 2013 no has definido my car. ni tampoco samsite Link to comment
StanMarsh Posted July 4, 2013 Author Share Posted July 4, 2013 no has definido my car. ni tampoco samsite Dame un ejemplo no entiendo... Link to comment
Plate Posted July 4, 2013 Share Posted July 4, 2013 por ejemplo function comandoxd() local x, y, z = getElementPosition(localPlayer) local mycar = createVehicle(411, x, y, z) local weap = createWeapon(38, 0, 0, 0) attachElements (weap, mycar) end addCommandHandler("ejemplo", comandoxd) Link to comment
NodZen Posted July 4, 2013 Share Posted July 4, 2013 por ejemplo function comandoxd() local x, y, z = getElementPosition(localPlayer) local mycar = createVehicle(411, x, y, z) local weap = createWeapon(38, 0, 0, 0) attachElements (weap, mycar) end addCommandHandler("ejemplo", comandoxd) createWeapon no vá con ID si no con el nombre del arma. Link to comment
Recommended Posts