Jump to content

[Duda]CreateWeapon


Recommended Posts

Posted

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?

Posted
no es nesesario, los argumentos estan mas que claro

weap = createWeapon(...

if speed > 150 then

setWeaponState( weap, "firing")

..

me da error en la linea 1 attempt to call global "createweapon" (a nil value)

Posted
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 
  

Posted
    weap = createWeapon("38") 
    if speed > 12 then 
    setWeaponState( weap, "firing", true) 
     end 
      

Posted

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

Posted

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) 

Posted
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. :?

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...