-
Posts
378 -
Joined
-
Last visited
Everything posted by BriGhtx3
-
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?
-
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
-
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
-
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
-
Easy thing policePlayer is wrong! Paramters for onPlayerQuit : string quitType, string reason, element responsibleElement This script will never work, cause both players are nil.
-
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.
-
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
-
The chat is double because of freeroam. Just stop the resource.
-
H5N1 this is clientside. It doesn't matter if there is a local or not
-
you cant have an script error in an image oO
-
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.
-
Lol that code is totally messed. onResourceStart has nothing to do with the player.
-
Wow. Thank you guys I hope this functions get accepted, this would be real awesome. Ill try to use onClientRender, and isElementOnScreen (or isLineOfSighClear)
-
How can I set an object damage proof or that it doesn't lose health? Do I have to use onClientRender and setElementHealth?
-
https://wiki.multitheftauto.com/wiki/DeleteResource
-
lol, at first rename your function oO Never use a functionname which is given to another function
-
I can give you are reason His script was right, yours not. Today every script you posted was wrong
-
He needs to see it cause he wants to know if the module is inserted. Second mysql_query exists in that plugin
-
Klesh, wont work (again) vehFix needs arguments. You cant just use thePlayer without declaring it
-
function vehFix ( loss ) thePlayer = getVehicleOccupant( source ) theVehicle = getPedOccupiedVehicle ( thePlayer ) setElementHealth(theVehicle,getElementHealth(theVehicle)+tonumber(loss)) end addEventHandler("onVehicleDamage",getRootElement(),vehFix)
-
function vehFix ( loss ) theVehicle = getPedOccupiedVehicle ( source ) thePlayer = getVehicleOccupant( source ) setElementHealth(theVehicle,getElementHealth(theVehicle)+tonumber(loss)) end addEventHandler("onVehicleDamage",getRootElement(),vehFix)
