Jump to content

mox.workz

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by mox.workz

  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.,
  13. Hi guyz! Sorry for bothering you again., Cause I'm currently modifying my server. I just downloaded an Iron Man Skin pack., and I wonder if it is possible to put it on my server? it has this .txd and .dff files that is similar to what's inside the gta3.img I wonder if I could add it to the .img file and manually encode a script to add it on the skin list in my server., I also added the Super Powers - Slothman as a resource. What i would like to do is that the player will automatically transform it's skin into an Iron Man or other skin when they choose a certain Element Please Help _________________________________________________________________________________ Super Powers by Slothman: https://forum.multitheftauto.com/viewtopic.php?f=108&t=53505
  14. Ohw yah! I already fixed it., anyways, Thanks guys!
  15. If the car has 4 doors this is already possible just press G instead of F or Enter I didn't try that one., the one that i already tried is the warp function in the default package of MTA v1.4, the freeroam gamemode., when a car is already have a 1 passenger and a driver., it will says that there's no vacant passenger seat blah blah blah.,
  16. Yah! cause somehow even though you're driving a four seater car., you can only have a one passenger., how 'bout the other passenger set at the back? i want that to be able to occupy., *joyride*
  17. well, if you are in a car like the freeroam gamemode you can only have 1 passenger right? What i wish to do is change that or edit something so that the freeroam gamemode in my server is able to have a 3 passenger and a driver in a 4-door car.,
  18. Whoow! I did merged it with my server! So awesome script! Thnx!
  19. Hi! it's me again! is it possible for me to edit something in a certain file to my server so that there will be a four 3 passenger and a driver in a car?
  20. wow! dude! it worked! You're so awesome! thnx!!
  21. Wow! I'm fascinated that you really are a man-in-forum(if that what they called)., lol! Well., this is what in my mind right now: function toggleregen() code goes here: blah blah blah blah blah blah.. addCommandHandler('dog', toggleregen)
  22. Ow! I forgot to tell., i'm not really a scripter., can you please give me a script/code to this? and where could I possible put it., in a .LUA or .XML?
×
×
  • Create New...