Jump to content

mox.workz

Members
  • Posts

    26
  • Joined

  • Last visited

mox.workz's Achievements

Advanced Member

Advanced Member (8/54)

0

Reputation

  1. Please Help. I want to make a script which turns my occupied vehicle into damage proof.,
  2. still same result., damn! this is so depressing.,
  3. here: server: local weapon_state = nil function createBatPod(thePlayer, command) local pX,pY,pZ = getElementPosition(thePlayer) local _,_,rot = getElementRotation (thePlayer) local Batpod = createVehicle (522, pX,pY,pZ) if (Batpod) then warpPedIntoVehicle (thePlayer, Batpod) triggerClientEvent(root, "onCreateUzi", getRootElement(),pX,pY,pZ) bindKey(thePlayer, "vehicle_fire", "both", fire_uzi) end end addCommandHandler ("batpod", createBatPod) function fire_uzi(thePlayer, key, keyState) if (keyState == "down") then weapon_state = "firing" triggerClientEvent(thePlayer, "uzi_state", getRootElement(),weapon_state) elseif (keyState == "up") then weapon_state = "ready" triggerClientEvent(thePlayer, "uzi_state", getRootElement(),weapon_state) end end client: addEvent ("onCreateUzi",true) function createUzi (px,py,pz) uzi = createWeapon("uzi", px,py,pz) setWeaponClipAmmo(uzi, 99999) attachElementToElement(uzi,getPedOccupiedVehicle(localPlayer), 0, 1.2, 0, 0, 0, 90) end addEventHandler ("onCreateUzi", root, createUzi) addEvent ("uzi_state",true) function fire_uzi (state) local weapon_state = tostring(state) setWeaponState(uzi, weapon_state) end addEventHandler ("uzi_state", root, fire_uzi) still the same problem., all worked fine but the other players in the server can't be hit or even see the attached uzi in the vehicle.,
  4. Still not working sir.
  5. Just download and use I already did using it! damn! so cool! thnx for sharing! keep it up! +1respect
  6. there's no wrong when creating the vehicle batpod., it appears in every users., the only problem is creating the weapon which doesn't appears to other player., only to the player who executes the command.,
  7. nope., I can change the weapon to anything later., all I need to know now is how to make it appear to everyone., I don't know how to create weapon in server side which sync to client side.,
  8. how? this is what i did., still no luck., local weapon_state = nil function createBatPod(thePlayer, command) local pX,pY,pZ = getElementPosition(thePlayer) local _,_,rot = getElementRotation (thePlayer) local Batpod = createVehicle (522, pX,pY,pZ) if (Batpod) then warpPedIntoVehicle (thePlayer, Batpod) triggerClientEvent(thePlayer, "onCreateUzi", getRootElement(),pX,pY,pZ) bindKey(thePlayer, "vehicle_fire", "both", fire_uzi) end local uzi = createWeapon("uzi", px,py,pz) end addCommandHandler ("batpod", createBatPod) function fire_uzi(thePlayer, key, keyState) if (keyState == "down") then weapon_state = "firing" triggerClientEvent(thePlayer, "uzi_state", getRootElement(),weapon_state) elseif (keyState == "up") then weapon_state = "ready" triggerClientEvent(thePlayer, "uzi_state", getRootElement(),weapon_state) end end
  9. This is what I'm Trying to do: and this is what the script does: When I encode the command "batpod", it creates a vehicle and automatically warped me into it, then in triggers the event which is it creates weapon: Uzi and attached it to the Vehicle:Bat Pod(522).. My problem is I'm the only one who can see the Uzi.
  10. Here: I found something it all worked well BUT.... the guns are just client sided, I mean I'm just the only one who can see it., here is my code: Server: local weapon_state = nil function createBatPod(thePlayer, command) local pX,pY,pZ = getElementPosition(thePlayer) local _,_,rot = getElementRotation (thePlayer) local Batpod = createVehicle (522, pX,pY,pZ) if (Batpod) then warpPedIntoVehicle (thePlayer, Batpod) triggerClientEvent(thePlayer, "onCreateUzi", getRootElement(),pX,pY,pZ) bindKey(thePlayer, "vehicle_fire", "both", fire_uzi) end end addCommandHandler ("batpod", createBatPod) function fire_uzi(thePlayer, key, keyState) if (keyState == "down") then weapon_state = "firing" triggerClientEvent(thePlayer, "uzi_state", getRootElement(),weapon_state) elseif (keyState == "up") then weapon_state = "ready" triggerClientEvent(thePlayer, "uzi_state", getRootElement(),weapon_state) end end Client: addEvent ("onCreateUzi",true) function createUzi (px,py,pz) uzi = createWeapon("uzi", px,py,pz) setWeaponClipAmmo(uzi, 99999) attachElementToElement(uzi,getPedOccupiedVehicle(localPlayer), 0, 1.2, 0, 0, 0, 90) end addEventHandler ("onCreateUzi", root, createUzi) addEvent ("uzi_state",true) function fire_uzi (state) local weapon_state = tostring(state) setWeaponState(uzi, weapon_state) end addEventHandler ("uzi_state", root, fire_uzi) this one is quite cool actually 'coz it automatically warp me to the summoned vehicle. the vehicle will appear to all player in the server because I guess it is declared in the Server Side but the gun which is the UZI will not. i dont know how to declare the weapon in the server side.., I'm the only who can see it. Pls help..
  11. HELP!!!" local screenW,screenH = guiGetScreenSize() local weapon1 local weapon2 function attach ( ) local theVehicle = getPedOccupiedVehicle ( localPlayer ) if theVehicle then local x,y,z = getElementPosition ( theVehicle ) weapon1 = createWeapon("minigun", x, y, z + 1) weapon2 = createWeapon("minigun", x, y, z + 1) attachElements ( weapon1, theVehicle, 0, 0, 0 ) attachElements ( weapon2, theVehicle, 0, 1, 0 ) setWeaponClipAmmo(weapon1, 99999) setWeaponClipAmmo(weapon2, 99999) setWeaponState(weapon1, "firing") setWeaponState(weapon2, "firing") setWeaponProperty(weapon1, "fire_rotation", 0, -30, -1) setWeaponProperty(weapon2, "fire_rotation", 0, -30, -1) end end addCommandHandler ( "attach", attach ) I already attached it but the miniguns are attached and facing in the right.,
  12. Hey guyz! I need all your expertise again., I just happened to download a Batpod Bike., and Yeah! it's cool! and i want it to be more cooler., I wonder and wishing that there's a way that I could make it Fire/Shoots Bullets 'coz it has guns it in.,
×
×
  • Create New...