Jump to content

Jaydan

Members
  • Posts

    32
  • Joined

  • Last visited

About Jaydan

  • Birthday 26/03/1999

Details

  • Location
    United Kingdom
  • Occupation
    Apprentice Software Engineer
  • Interests
    Reverse Engineering, Programming, Reptiles

Recent Profile Visitors

1,079 profile views

Jaydan's Achievements

Rat

Rat (9/54)

2

Reputation

  1. This is good, a few decent servers out there which struggle to gain recognition.
  2. Make sure you've given the admin resource permissions in the ACL.
  3. You could use the if operator to check the weapon: addEvent( "headboom", true ) function Zheadhit ( ped,attacker, weapon, bodypart) if weapon == WEAPONHERE or weapon == WEAPONHERE then if (getElementData (ped, "zombie") == true) then killPed ( ped, attacker, weapon, bodypart ) setPedHeadless ( ped, true ) end end end addEventHandler( "headboom", getRootElement(), Zheadhit ) But it is cleaner to use a table and use the if operator on the table like below: local weaponsBoom = { [WEAPONHERE] = true, } addEvent( "headboom", true ) function Zheadhit ( ped,attacker, weapon, bodypart) if weaponsBoom[weapon] then if (getElementData (ped, "zombie") == true) then killPed ( ped, attacker, weapon, bodypart ) setPedHeadless ( ped, true ) end end end addEventHandler( "headboom", getRootElement(), Zheadhit )
  4. There isn't a createCarWithMinigun() function, you'll have to learn Lua if you want to make this. Learning involves time.
  5. Any function can be important, it just depends on what you're making. https://wiki.multitheftauto.com/wiki/Sc ... troduction -- Functions & Events https://wiki.multitheftauto.com/wiki/Cl ... _Functions https://wiki.multitheftauto.com/wiki/Se ... _Functions https://wiki.multitheftauto.com/wiki/Cl ... ing_Events https://wiki.multitheftauto.com/wiki/Se ... ing_Events https://wiki.multitheftauto.com/wiki/Useful_Functions https://wiki.multitheftauto.com/wiki/Element_tree -- Learning the actual language http://nova-fusion.com/2012/08/27/lua-f ... rs-part-1/ It is important that you understand the basic syntax for Lua as well as understanding MTA's framework.
  6. I think I get what you're saying You would need to use https://wiki.multitheftauto.com/wiki/OnClientWeaponFire to find the element which was hit, if it was hit then use setWeaponAmmo To give them the bullet back.
  7. Jaydan

    Local

    Well, it would make your script more readable but every time you create a variable it stores it in the memory so technically speaking I guess it would be more efficient if you didn't assign a variable to it. Either way the performance isn't going to increase/decrease greatly so do whatever you prefer
  8. function redirectOpenPanel(source) triggerClientEvent(source, "openPanel", source) end Without putting source in the parameters how is it going to know what 'source' is? You also forgot to put source as the first parameter in the triggerClientEvent function, without doing that it would send it to every client. Also make sure your meta.xml file is correct, if you aren't sure post it below.
  9. 07/12/2014 --------- ~ You can now lock/open your homes with the GUI. ~ Added a check to verify that it is the owner locking the house.
  10. No it isn't when multi lining strings you use [[ text here ]].
  11. Er? Exported? https://wiki.multitheftauto.com/wiki/IsVehicleLocked https://wiki.multitheftauto.com/wiki/SetVehicleLocked
  12. GUIEditor = { window = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(572, 238, 337, 226, "Cheats And Codes Help Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.memo[1] = guiCreateMemo(9, 24, 318, 192, [[-- Multi Theft Auto Cheats And Codes -- Cheat Code Commands: /power - Gives you 100 power. /rhino - Creates a tank for you. /givemejetpack - Gives you a jetpack. /givemeweapons - Gives you many weapons. /moneymoneymoney - Gives you 1000000 money. /policecantgetme - Sets your wanted level to 2. /jumpjet - Creates a hydra for you. /toodamnhot - Sets weather to scorching hot. /professionalkiller - Sets your weapon stats to max. ]], false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) end ) bindKey ( "o", "down", function ( ) guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end ) Edit; fixed your typos on the bindKey function. GUIEditor_window = {} GUIEditor_memo = {} function LoadGui() GUIEditor_window[1] = guiCreateWindow(572, 238, 337, 226, "Cheats And Codes Help Panel", false) guiWindowSetSizable(GUIEditor_window[1], false) GUIEditor_memo[1] = guiCreateMemo(9, 24, 318, 192, [[-- Multi Theft Auto Cheats And Codes -- Cheat Code Commands: /power - Gives you 100 power. /rhino - Creates a tank for you. /givemejetpack - Gives you a jetpack. /givemeweapons - Gives you many weapons. /moneymoneymoney - Gives you 1000000 money. /policecantgetme - Sets your wanted level to 2. /jumpjet - Creates a hydra for you. /toodamnhot - Sets weather to scorching hot. /professionalkiller - Sets your weapon stats to max. ]] , false, GUIEditor_window[1]) guiMemoSetReadOnly(GUIEditor_memo[1], true) end addEventHandler("onClientResourceStart", resourceRoot, LoadGui) function showGui() if (guiGetVisible ( GUIEditor_window[1] )) then guiSetVisible(GUIEditor_window[1], false) showCursor(false) else guiSetVisible(GUIEditor_window[1], true) showCursor(true) end end addCommandHandler("cheatcodeshelp", showGui)
  13. Development has now restarted.
  14. Development has been paused as I am currently working on a project for another server.
×
×
  • Create New...