xeon17 Posted August 9, 2014 Posted August 9, 2014 Hello guys i have a question about automatic weapons , how i can create a weapon and the weapons should attact/fire on every player or vehicle that is visible to the weapon , or near the weapon.. I know to make a weapon but the stuff with attacting i don't can anyone give me a example how i can do it , or the sctipt allready exist in the community. Thanks. A unique GangWar gamemode waiting for you!Click here for more information.
Et-win Posted August 9, 2014 Posted August 9, 2014 Search in the community for aimbot and you get what you want. For vehicles you just can edit it then. (I guess you want this?) ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
abod99119911 Posted August 9, 2014 Posted August 9, 2014 Search in the community for aimbot and you get what you want. For vehicles you just can edit it then. (I guess you want this?) i think he mean that gun (anti rush)
xeon17 Posted August 9, 2014 Author Posted August 9, 2014 I mean to create a gun ( a m4 or sniper ) and the gun should fire on everything ( vehicles with players and on players ) and take their health , the gun should be only fire on elements that are visable or near the gun.. @ About Community I tried but there is nothing , pure nothing about ''aimbot'' A unique GangWar gamemode waiting for you!Click here for more information.
Et-win Posted August 9, 2014 Posted August 9, 2014 You could try to check how this guy did it: https://community.multitheftauto.com/ind ... ls&id=9568 (Looking, not stealing.) ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
xeon17 Posted August 9, 2014 Author Posted August 9, 2014 Damn , sounds maybe funny but i still no understand ._. this give weapons to peds , i want to create a simple weapon on the ground , in the script isn't stuff like createWeapon , setWeaponTarget etc etc A unique GangWar gamemode waiting for you!Click here for more information.
Et-win Posted August 9, 2014 Posted August 9, 2014 But it has shooting automatically towards vehicles and players. (It just shoots to the player, but hits vehicles if they are in) (Atleast, as far as I saw on the picture). You can rebuild it to a weapon on the ground. Instead of a ped, the gun. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
xeon17 Posted August 9, 2014 Author Posted August 9, 2014 I don't see anything in the script how to give weapons to peds or to create weapons.. A unique GangWar gamemode waiting for you!Click here for more information.
Et-win Posted August 9, 2014 Posted August 9, 2014 createObject --(I think?) createElement --(Maybe this then?) giveWeapon ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
xeon17 Posted August 9, 2014 Author Posted August 9, 2014 I trought i need to use this function https://wiki.multitheftauto.com/wiki/CreateWeapon A unique GangWar gamemode waiting for you!Click here for more information.
Et-win Posted August 9, 2014 Posted August 9, 2014 That's funny. The first time when I'm only searching for that code in server-side it's a client-side only code. Yes, that is the code. x3 ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
xeon17 Posted August 9, 2014 Author Posted August 9, 2014 i'll try it and post later did i created it , will the functions work for the thing i want to create? A unique GangWar gamemode waiting for you!Click here for more information.
Et-win Posted August 9, 2014 Posted August 9, 2014 I think so. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
xeon17 Posted August 13, 2014 Author Posted August 13, 2014 I tried but ._. Nothing happen , no bugs in debug.. function weapons ( localPlayer) if not (isAllownedPlayer(thePlayer)) then return end local x,y,z = getElementPosition(thePlayer) local minigunw = createWeapon("minigun", x, y, z + 1) setWeaponClipAmmo ( minigunw,99999) setWeaponState ( minigunw,"firing") for _, player in ipairs(getElementsByType("player")) do xz , xs , xt = getElementPosition (player) setWeaponTarget ( minigunw , xz , xs , xt ) end end end addCommandHandler("mini", weapons) A unique GangWar gamemode waiting for you!Click here for more information.
Et-win Posted August 13, 2014 Posted August 13, 2014 function weapons ( localPlayer) if not (isAllownedPlayer(thePlayer)) then return end Parameter wrong. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
xeon17 Posted August 13, 2014 Author Posted August 13, 2014 Fixed ( but still no work ) Code: function weapons ( localPlayer) if not (isAllownedPlayer(localPlayer)) then return end local x,y,z = getElementPosition(localPlayer) local minigunw = createWeapon("minigun", x, y, z + 1) setWeaponClipAmmo ( minigunw,99999) setWeaponState ( minigunw,"firing") for _, player in ipairs(getElementsByType("player")) do xz , xs , xt = getElementPosition (player) setWeaponTarget ( minigunw , xz , xs , xt ) end end end addCommandHandler("mini", weapons) A unique GangWar gamemode waiting for you!Click here for more information.
Et-win Posted August 13, 2014 Posted August 13, 2014 function weapons ( thePlayer) if not (isAllownedPlayer(thePlayer)) then return end outputChatBox("Test1") local x,y,z = getElementPosition(thePlayer) local minigunw = createWeapon("minigun", x, y, z + 1) setWeaponClipAmmo ( minigunw,99999) setWeaponState ( minigunw,"firing") for _, player in ipairs(getElementsByType("player")) do xz , xs , xt = getElementPosition (player) setWeaponTarget ( minigunw , xz , xs , xt ) end end end addCommandHandler("mini", weapons) Guess it is server-sided. Does it output "Test1" ? ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
xeon17 Posted August 13, 2014 Author Posted August 13, 2014 It output nothing , the functions are client side ( weapon functions ) A unique GangWar gamemode waiting for you!Click here for more information.
Et-win Posted August 13, 2014 Posted August 13, 2014 function weapons ( ) if not (isAllownedPlayer(localPlayer)) then return end outputChatBox("Test1") local x,y,z = getElementPosition(localPlayer) local minigunw = createWeapon("minigun", x, y, z + 1) setWeaponClipAmmo ( minigunw,99999) setWeaponState ( minigunw,"firing") for _, player in ipairs(getElementsByType("player")) do xz , xs , xt = getElementPosition (player) setWeaponTarget ( minigunw , xz , xs , xt ) end end end addCommandHandler("mini", weapons) *Also wonders why the weapon functions are not linked + colored* ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
Max+ Posted August 13, 2014 Posted August 13, 2014 Et-win setWeaponTarget need to write how to target at , also there is a problem with minigun fire rotation also why they aren't colored becuase they are new , addCommandHandler ('mini', function ( ) if not (isAllownedPlayer(localPlayer)) then return end local nx, ny, nz = getElementPosition ( localPlayer ) local minigunw = createWeapon ( 'minigun', nx, ny, nz +1 ) setWeaponClipAmmo ( minigunw,99999) setWeaponState ( minigunw,"firing") setWeaponProperty( minigunw, "fire_rotation", 0, -30, 0 ) for _, nMax in ipairs ( getElementsByType ('player' )) do x, y, z = getElementPosition ( nMax ) setWeaponTarget ( minigunw ,nMax, 255 ) end end ) - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
Et-win Posted August 13, 2014 Posted August 13, 2014 Et-win setWeaponTarget need to write how to target at I'm blind. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
xeon17 Posted August 13, 2014 Author Posted August 13, 2014 the problem was in utill function because dosen't work in client side your code is awesome Max+ , but can you make better weapon rotation ? please. A unique GangWar gamemode waiting for you!Click here for more information.
Max+ Posted August 13, 2014 Posted August 13, 2014 the problem was in utill function because dosen't work in client sideyour code is awesome Max+ , but can you make better weapon rotation ? please. what's the problem with the rotation ? + see the example about it , CreateWeapon - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
xeon17 Posted August 13, 2014 Author Posted August 13, 2014 Ah forget what i said , the problem was the weapons always killed me when i created ( fixed ) can you make the weapons aslo fire on vehicles please ? ._. A unique GangWar gamemode waiting for you!Click here for more information.
Et-win Posted August 13, 2014 Posted August 13, 2014 getElementsByType("vehicle") ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
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