Jump to content

BriGhtx3

Members
  • Posts

    378
  • Joined

  • Last visited

Everything posted by BriGhtx3

  1. function keineAutosBeiMarkern(hitElement) if getElementType(hitElement) == "vehicle" then cancelEvent() end end addEventHandler("onMarkerHit",getRootElement(),keineAutosBeiMarkern) This is my serverside script. When I enter a marker with a vehicle i still get teleported.. How can I change the script that I don't get teleported when entering a marker with a vehicle?
  2. It just can't be I also have something like this for a self-menu and it works... I even don't get an error when removing the gui and clicking on the ped
  3. local WeaponPed = createPed ( 29, 296.447265625, -40.435546875, 1001.515625 ) setElementInterior ( WeaponPed, 1 ) Ammu_Window = guiCreateWindow(350,80,346,592,"Waffen",false) guiWindowSetMovable(Ammu_Window,false) guiWindowSetSizable(Ammu_Window,false) Ammu_LBL_Welcome = guiCreateLabel(42,29,271,62,"Willkommen in der Ammunation-Filliale!\nHier finden Sie Waffen aller Art.\nSuchen Sie sich eine der unten\naufgelisteten Waffen aus und sie gehört Ihnen.",false,Ammu_Window) guiSetFont(Ammu_LBL_Welcome,"default-bold-small") Ammu_LBL_Melee = guiCreateLabel(13,114,43,17,"Melee :",false,Ammu_Window) Ammu_knife = guiCreateStaticImage(77,118,70,70,"images/m.png",false,Ammu_Window) buy_knife = guiCreateButton(65,191,90,19,"Kaufen - 150$",false,Ammu_Window) Ammu_bat = guiCreateStaticImage(188,118,75,70,"images/b.png",false,Ammu_Window) buy_bat = guiCreateButton(183,191,90,19,"Kaufen - 150$",false,Ammu_Window) Ammu_LBL_Pistol = guiCreateLabel(11,224,51,17,"Pistolen :",false,Ammu_Window) guiSetVisible(Ammu_Window,false) function showmedaweapon(player) if guiGetVisible (Ammu_Window) then guiSetVisible(Ammu_Window,false) showCursor(false) else guiSetVisible(Ammu_Window,true) showCursor(true) end end addCommandHandler("ssa",showmedaweapon) function hans_click ( button, state, absX, absY, wx, wy, wz, element ) if ( element and element == WeaponPed ) then guiSetVisible ( Ammu_Window, true ) end end addEventHandler ( "onClientClick", getRootElement(), hans_click ) I can show the GUI via "SSA" but not via clicking
  4. Hey, I know this topic was created for ~3kkkkk times, but i didn't find any solution. I created a ped like this (EVERYTHING IS CLIENTSIDE): local WeaponPed = createPed(29,296.447265625,-40.435546875,1001.515625) setElementInterior(WeaponPed,1) And now I have a function for clicking the ped: function hans_click(button, state, absX, absY, wx, wy, wz, element) if element == WeaponPed then guiSetVisible(Ammu_Window,true) end end addEventHandler("onClientClick", getRootElement(), hans_click) But the GUI just doesn't show If I remove the line : if element == WeaponPed then the GUI appears. I hope someone can help me^^ Thanks
  5. Easy thing policePlayer is wrong! Paramters for onPlayerQuit : string quitType, string reason, element responsibleElement This script will never work, cause both players are nil.
  6. csmit Totally wrong! MTA is a software like every other software. So they can create events for TTS or Microphone commands. @Topic you have to submit it somewhere else.
  7. This is not a flame war And Im not American, Australian,... so dont expect that everyone speaks english without mistakes. But you are australian, so you should know what i meant
  8. BriGhtx3

    problem

    The chat is double because of freeroam. Just stop the resource.
  9. BriGhtx3

    local gui = {};

    H5N1 this is clientside. It doesn't matter if there is a local or not
  10. BriGhtx3

    local gui = {};

    you cant have an script error in an image oO
  11. BriGhtx3

    local gui = {};

    is this your whole code?
  12. I just said that it is wrong. You cant get the player name from onResourceStart. And this is totally right, so I cant be blind or what you want to call me.
  13. Lol that code is totally messed. onResourceStart has nothing to do with the player.
  14. Wow. Thank you guys I hope this functions get accepted, this would be real awesome. Ill try to use onClientRender, and isElementOnScreen (or isLineOfSighClear)
  15. How can I set an object damage proof or that it doesn't lose health? Do I have to use onClientRender and setElementHealth?
  16. https://wiki.multitheftauto.com/wiki/DeleteResource
  17. lol, at first rename your function oO Never use a functionname which is given to another function
  18. I can give you are reason His script was right, yours not. Today every script you posted was wrong
  19. He needs to see it cause he wants to know if the module is inserted. Second mysql_query exists in that plugin
  20. Klesh, wont work (again) vehFix needs arguments. You cant just use thePlayer without declaring it
  21. function vehFix ( loss ) thePlayer = getVehicleOccupant( source ) theVehicle = getPedOccupiedVehicle ( thePlayer ) setElementHealth(theVehicle,getElementHealth(theVehicle)+tonumber(loss)) end addEventHandler("onVehicleDamage",getRootElement(),vehFix)
  22. function vehFix ( loss ) theVehicle = getPedOccupiedVehicle ( source ) thePlayer = getVehicleOccupant( source ) setElementHealth(theVehicle,getElementHealth(theVehicle)+tonumber(loss)) end addEventHandler("onVehicleDamage",getRootElement(),vehFix)
×
×
  • Create New...