MACIEKW89
Members-
Posts
117 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
MACIEKW89's Achievements
Sucka (13/54)
0
Reputation
-
No, you can't. Try on server side with onPlayerClick event https://wiki.multitheftauto.com/wiki/OnPlayerClick .
-
Hi, Try with that : function fanFunction() bindKey ( "lshift","down", function () local vehicle = getPedOccupiedVehicle(localPlayer) local sx,sy,sz = getElementVelocity ( vehicle ) setElementVelocity( vehicle ,sx, sy, sz+0.5 ) end) end addEventHandler("bindme",fanFunction)
-
Hi, Try with that : local sirenSound function startSiren() sirenSound = playSound3D("siren.mp3", 2097.00, -1629.59, 18.79, true) setSoundVolume(sirenSound,100) end addCommandHandler("start", startSiren) function stopSiren() stopSound(sirenSound) end addCommandHandler("stop", stopSiren) Or try with that : addCommandHandler("start", function() local sirenSound = playSound3D("siren.mp3", 2097.00, -1629.59, 18.79, true) setSoundVolume(sirenSound,100) addCommandHandler("stop", function() stopSound(sirenSound) end) end)
-
You're welcome ;b
-
You're welcome ;b
-
@spoty, why? He can name custom functions as he want.
-
It will be somethink like that : addEventHandler("onPlayerLogin", root, function() local accName = getAccountName(getPlayerAccount(source)) if not accName then return end if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then outputChatBox(getPlayerName(source).." has logged in as Admin!", root, 255, 255, 255, true) elseif isObjectInACLGroup("user."..accName, aclGetGroup("Moderator")) then outputChatBox(getPlayerName(source).." has logged in as Moderator!", root, 255, 255, 255, true) end end) And sorry for bad english ;b
-
Try: function player_Wasted ( ammo, attacker, weapon, bodypart ) if attacker then if attacker==source then triggerClientEvent(source,"startRespawnShow",source,source,0) giveDeath(source) setkdr(source) else giveKill(attacker) setkdr(attacker) triggerClientEvent(source,"startRespawnShow",source,attacker,weapon) giveDeath(source) setkdr(source) setCameraTarget(source,attacker) end else triggerClientEvent(source,"startRespawnShow",source,source,0) giveDeath(source) setkdr(source) end end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted )
-
Give us some code. Then we can try to help you.
-
local screenW, screenH = guiGetScreenSize() addEventHandler("onClientResourceStart", resourceRoot, function() ventana = guiCreateWindow((screenW - 456) / 2, (screenH - 307) / 2, 456, 307, ".-Tienda Zenbeit-.", false) guiWindowSetSizable(ventana, false) botonvida = guiCreateButton(9, 22, 97, 21, "Vida [100]", false, ventana) botonarmadura = guiCreateButton(9, 53, 97, 21, "Armadura [100]", false, ventana) botonminigun = guiCreateButton(349, 25, 97, 18, "Minigun [100]", false, ventana) botonbazooka = guiCreateButton(349, 56, 97, 18, "Bazooka [10]", false, ventana) guiLabelSetVerticalAlign(preciovida, "center") precioarmadura = guiCreateLabel(106, 53, 37, 21, "$400", false, ventana) guiLabelSetHorizontalAlign(precioarmadura, "center", false) guiLabelSetVerticalAlign(precioarmadura, "center") preciominigun = guiCreateLabel(297, 25, 47, 21, "$50.000", false, ventana) guiLabelSetVerticalAlign(preciominigun, "center") preciobazooka = guiCreateLabel(297, 56, 47, 18, "$50.000", false, ventana) guiLabelSetHorizontalAlign(preciobazooka, "center", false) guiLabelSetVerticalAlign(preciobazooka, "center") botonhunter = guiCreateButton(9, 237, 97, 21, "Hunter", false, ventana) botonhydra = guiCreateButton(9, 268, 97, 21, "Hydra", false, ventana) preciohunter = guiCreateLabel(106, 237, 56, 21, "$100.000", false, ventana) guiLabelSetVerticalAlign(preciohunter, "center") preciohydra = guiCreateLabel(106, 268, 56, 21, "$100.000", false, ventana) guiLabelSetVerticalAlign(preciohydra, "center") preciorhino = guiCreateLabel(292, 268, 57, 21, "$100.000", false, ventana) guiLabelSetVerticalAlign(preciorhino, "center") precioseas = guiCreateLabel(287, 240, 62, 18, "$100.000", false, ventana) guiLabelSetHorizontalAlign(precioseas, "center", false) guiLabelSetVerticalAlign(precioseas, "center") botonrhino = guiCreateButton(349, 271, 97, 18, "Rhino", false, ventana) botonseas = guiCreateButton(349, 240, 97, 18, "Seasparrow", false, ventana) imagen = guiCreateStaticImage(143, 98, 172, 99, ":Zombies/edf/zombiespawn.png", false, ventana) guiSetAlpha(imagen, 0.43) guiSetVisible(ventana, false) end) function OpenWin() if guiGetVisible(ventana) then guiSetVisible(ventana, false) showCursor(false) else guiSetVisible(ventana, true) showCursor(true) end end bindKey("F7", "down", OpenWin)
-
Hi, Try with that: addEventHandler("onPlayerLogin", root, function() local accName = getAccountName(getPlayerAccount(source)) if not accName then return end if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then outputChatBox(getPlayerName(source).." has logged in as Admin!", root, 255, 255, 255, true) end end)
-
Hi, Try that code: local sW, sH = guiGetScreenSize() local dir = "img.png" --Your image directory addEventHandler("onClientRender", root, function() local i_w = 72 --Your image size (width) local i_h = 60 --Your image size (height) local i_ratio = i_w / i_h local iscale_w = 1700 / sW i_w = i_w / iscale_w i_h = i_w / i_ratio for i, v in ipairs(getElementsByType("marker")) do local x, y, z = getElementPosition(v) local cx, cy, cz = getCameraMatrix() if isLineOfSightClear(cx, cy, cz, x, y, z, false, false, false, false, false, false, false, v) then local dist = getDistanceBetweenPoints3D(cx, cy, cz, x, y, z) if dist <= 20 then --If distance between player camera and marker is <= 20, then show image local px, py = getScreenFromWorldPosition(x, y, z + 1, 0.06) if px then dxDrawImage(px-i_w/2, py-sH/5, i_w, i_h, dir, 0, 0, 0, tocolor( 255, 255, 255, 255 )) end end end end end)
-
Hi, Try that: local screenW, screenH = guiGetScreenSize() function tekst() dxDrawText("blablabla", (screenW * 0.0516) - 1, (screenH * 0.5130) - 1, (screenW * 0.3094) - 1, (screenH * 0.6130) - 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("blablabla", (screenW * 0.0516) + 1, (screenH * 0.5130) - 1, (screenW * 0.3094) + 1, (screenH * 0.6130) - 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("blablabla", (screenW * 0.0516) - 1, (screenH * 0.5130) + 1, (screenW * 0.3094) - 1, (screenH * 0.6130) + 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("blablabla", (screenW * 0.0516) + 1, (screenH * 0.5130) + 1, (screenW * 0.3094) + 1, (screenH * 0.6130) + 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("blablabla", screenW * 0.0516, screenH * 0.5130, screenW * 0.3094, screenH * 0.6130, tocolor(18, 84, 235, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) end addEventHandler("onClientMarkerHit", root, function() if source==kaboommarker then addEventHandler("onClientRender", root, tekst) end end)
-
Number 2 : meta.xml : <meta> <info author="Maciej 'MACIEKW89' Wituszyński" type="script" version="1.0"/> <script src="c.lua" type="client"/> <script src="s.lua" type="server"/> </meta> c.lua : addEventHandler("onClientPlayerDamage",root, function() if getElementData(source,"godmode") then cancelEvent() end end) addEventHandler("onClientPlayerStealthKill",localPlayer, function (targetPlayer) if getElementData(targetPlayer,"godmode") then cancelEvent() end end) s.lua : addCommandHandler("godmode", function(thePlayer) local account = getPlayerAccount (thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if (isObjectInACLGroup("user."..accountName, aclGetGroup("Admin"))) then local state = (not getElementData(thePlayer, "godmode")) setElementData(thePlayer, "godmode", state) end end) Co do pierwszego to troszkę więcej pisania, a ja niestety leniwy jestem ;b. Nie testowane, robione na szybko. Mam nadzieję, że pomogłem.