Jump to content

ElexTron Software

Members
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ElexTron Software

  • Rank
    Civilian

Details

  • Gang
    Dawgs
  1. Hello! I've got this code: client.lua -- GUI Init Stuff GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(289,156,220,324,"Objects",false) GUIEditor_Grid[1] = guiCreateGridList(9,26,202,253,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) GUIEditor_Button[1] = guiCreateButton(16,289,187,26,"Create Object",false,GUIEditor_Window[1]) showCursor( false ) guiSetVisible ( GUIEditor_Window[1], false ) guiSetInputEnabled(false) -- Fills the Gridlist with Objects function fillList() local se
  2. Oops! Never mind! It was a simple mistake! target = getPedOccupiedVehicle( tplayer ) I forgot to set the target to the vehicle! Thanks!
  3. Okay, now all the script seems to work correctly and the "detach" etc message comes up, but the vehicles do not appear to be attached in-game. client.lua function starty() attached = false -- Variable to Check Before Attaching/Detaching carrying = false -- Player Being Carried vehicle = 548 -- Carrying Vehicle (Cargobob) outputChatBox("values set "..getPlayerName(getLocalPlayer()).."") end addEventHandler("onClientResourceStart", getRootElement(), starty) -- Vehicles NOT Able to Be Carried local unAbleList = { {592},{577},{511},{548},{512},{593},{425},{520},{417},{48
  4. Hmm... I'll try it out thanks, I see now. And I'm not sure yet but possibly, yes, it should be serverside.
  5. Hello! I have made a client-side script that allows players in a Cargobob to carry other players in vehicles and also release them by using attach/detach elements. However, it is not fully working. My script is below: attached = false -- Variable to Check Before Attaching/Detaching carrying = false -- Player Being Carried vehicle = 548 -- Carrying Vehicle (Cargobob) outputChatBox("values set "..getPlayerName(getLocalPlayer()).."") -- Vehicles NOT Able to Be Carried local unAbleList = { {592},{577},{511},{548},{512},{593},{425},{520},{417},{487},{553},{488},{497},{563}
  6. Thanks! It works now! server.lua function burnPlayer ( player ) setPedOnFire( player, true ) end addEvent( "burn", true ) addEventHandler( "burn", getRootElement(), burnPlayer ) client.lua function initGUI() -- Creates the Parents GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} -- Window GUIEditor_Window[1] = guiCreateWindow(108,174,450,333,"ElexTronic Punish Panel",false) -- Gridlist playerList = guiCreateGridList(19,36,113,277,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(playerList,2) -- Fills the Gridlist With Players local column = g
  7. Hello. I have a script that creates kind-of a "Admin" GUI. I have the Interface set how I want it, but I'm having trouble getting the selected item in the gridlist. Here is my script: function initGUI() -- Creates the Parents GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} -- Window GUIEditor_Window[1] = guiCreateWindow(108,174,450,333,"ElexTronic Punish Panel",false) -- Gridlist playerList = guiCreateGridList(19,36,113,277,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(playerList,2) -- Fills the Gridlist With Players local column = guiGridList
  8. Oh wow! I didn't even notice that! Thanks! I guess I should look more at the code next time!
  9. Okay I just edited the code a little and this works, though it is more limited: function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if weapon == 23 and getElementType(hitElement)=="vehicle" then -- If the player shoots with a minigun, and hits another player... createProjectile(getLocalPlayer(),39,hitX,hitY,hitZ) end end -- Add this as a handler so that the function will be triggered every time the local player fires. addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), onClientPlayerWeaponFireFunc )
  10. Thanks but that still doesn't solve the problem.
  11. Is it possible to add a new weapon for real MTA use? Like say, for example, edit the weapons.xml inside the freeroam resource and add a new weapon? I kind of doubt this because I think that the weapons are built into GTA instead of externally defined, but I was still wondering...
  12. Well when I run it and start the resource no message is displayed whatsoever, whether a Satchel was placed or not, and no sound is played when I use the Satchel Detonator. EDIT: But no, no errors show up on the Console.
  13. Hello! I have this code (Ace_Gambit is the original creator of it) for mounting weapons onto a vehicle's passenger side for shooting that I got from an old topic. The thing is, when I try to use it, it doesn't work. Here are all the files: rocket_client.lua local root = getRootElement() local player = getLocalPlayer() local toggleVehicleWeapon = false local previousTick = getTickCount() local projectileType = 21 function updateVehicleWeapon(source, dataName) if (getElementType(source) == "vehicle" and dataName == "toggleVehicleWeapon") then toggleVehicleWeapon = (getElementData(s
  14. Hello! I am trying to make it so that: A) Every time a player fires a Silenced Pistol, a Satchel is placed at the pistol's target. B) Every time the Satchel Detonator is used, a detonation sound is played. I have made a script for this, but it is not working: client.lua -- This function gets triggered everytime player shoots. function onClientPlayerWeaponFireFunc(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) if weapon == 23 then -- If Silenced Pistol is Used... local aimSpot = getPedTarget(getLocalPlayer()) if aimSpot then createProjectile(getLocalPlayer(),39,getElementPosition(aimS
  15. Okay thanks for your help, it works now. And about the snd in playSound, it is a global sound from another part of the script. I didn't post the whole script, just the function that wasn't working. And I knew that math.random already returned a number, but after trying everything else (and forgetting the then after elseif ) I tried anything.
×
×
  • Create New...