RekZ Posted January 10, 2012 Posted January 10, 2012 el titulo lo dice todo existe algun scrip con el que teniendo equipada la M4 y por ejemplo pulsando la "N" lanzara una granada lo e visto en algunos server pero claro tengo este scrip pero no consigo hacer ke dispare por lo menos function onClientPlayerWeaponFireFunc(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if weapon == 31 then if not createProjectile(getLocalPlayer(),16,getElementPosition(getLocalPlayer()),200) then end end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc) Admin and Owner of the Pro Chile Community :3
Castillo Posted January 11, 2012 Posted January 11, 2012 function onClientPlayerWeaponFireFunc(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if (weapon == 31) then local x, y, z = getElementPosition(localPlayer) createProjectile(localPlayer,16,x,y,z,200) end end addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
RekZ Posted January 11, 2012 Author Posted January 11, 2012 cuando lo pruebo no funciona tengo ke añadirle algo mas ? Admin and Owner of the Pro Chile Community :3
Castillo Posted January 11, 2012 Posted January 11, 2012 local screenWidth, screenHeight = guiGetScreenSize() function onClientPlayerWeaponFireFunc(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if (weapon == 31) then local x2, y2, z2 = getWorldFromScreenPosition(screenWidth/2, screenHeight/2, 100) local x, y, z = getElementPosition(localPlayer) local force = getDistanceBetweenPoints2D(x, y, x2, y2) createProjectile(localPlayer,16,x,y,z,force/100) end end addEventHandler("onClientPlayerWeaponFire", root, onClientPlayerWeaponFireFunc) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
RekZ Posted January 11, 2012 Author Posted January 11, 2012 Nada no funciona nose que le puede pasar Admin and Owner of the Pro Chile Community :3
Castillo Posted January 11, 2012 Posted January 11, 2012 No se, ami me funciona perfecto. Estas seguro que lo pusiste como client-side en el meta.xml? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
RekZ Posted January 11, 2012 Author Posted January 11, 2012 si creo ke es esto ay lo enseño Admin and Owner of the Pro Chile Community :3
Castillo Posted January 11, 2012 Posted January 11, 2012 Aca funciona perfecto, estas usando el M4, verdad? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
RekZ Posted January 11, 2012 Author Posted January 11, 2012 si claro asta ay llego la M4 y luego disparo y ay keda Edit: nose porque pero aora funciona le quite al meta lo de autor,descripcion.... y ba perfectamente aunque me queda la duda supongo que seria de el meta.xml Gracias por tu ayuda Admin and Owner of the Pro Chile Community :3
Recommended Posts