DoubleMTA Posted January 15, 2008 Posted January 15, 2008 Where can I find this script? I need it for my GTA Multiplayerz server.
bossyboy Posted January 15, 2008 Posted January 15, 2008 I've been wondering this too, could someone share please?
DoubleMTA Posted January 16, 2008 Author Posted January 16, 2008 Can someone please post the URL to it?
Slothman Posted January 16, 2008 Posted January 16, 2008 Heres the simplest example of an exploding bullet script CLIENT STUFF function weaponfired (weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if source == getLocalPlayer () then triggerServerEvent ("bulletboom", getLocalPlayer (), hitX, hitY, hitZ ) end end addEventHandler ( "onClientPlayerWeaponFire", getRootElement(), weaponfired ) SERVER STUFF addEvent ("bulletboom", true ) function bulletexplosion (hitX, hitY, hitZ) createExplosion ( hitX, hitY, hitZ, 2 ) end addEventHandler("bulletboom",getRootElement(),bulletexplosion) play with it if you want to check which weapon is fired, credit the player with the kill, or generally improve it
Slothman Posted January 17, 2008 Posted January 17, 2008 creates an explosion wherever a bullet hits.
eAi Posted January 17, 2008 Posted January 17, 2008 It's neater to do the client handler like: function weaponfired (weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) triggerServerEvent ("bulletboom", source, hitX, hitY, hitZ ) end addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer (), weaponfired ) or even like: addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer (), function (weapon, ammo, ammoInClip, hitX, hitY, hitZ) triggerServerEvent ("bulletboom", source, hitX, hitY, hitZ ) end )
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now