Jump to content

iMr.3a[Z]eF

Members
  • Posts

    862
  • Joined

  • Last visited

Everything posted by iMr.3a[Z]eF

  1. Why not using elseif? addEventHandler( "onPlayerWasted", root, function (ammo, killer, weapon, bodypart ) if killer and killer ~= source then if bodypart == 9 and weapon == 22 then setPedStat( killer, 69, getPedStat( killer, 69 ) + 2 ); end elseif killer and killer ~= source then if bodypart == 8 and weapon == 22 then setPedStat( killer, 69, getPedStat( killer, 69 ) + 1 ); end elseif killer and killer ~= source then if bodypart == 7 and weapon == 22 then setPedStat( killer, 69, getPedStat( killer, 69 ) + 1 ); end elseif killer and killer ~= source then if bodypart == 6 and weapon == 22 then setPedStat( killer, 69, getPedStat( killer, 69 ) + 1 ); end elseif killer and killer ~= source then if bodypart == 5 and weapon == 22 then setPedStat( killer, 69, getPedStat( killer, 69 ) + 1 ); end elseif killer and killer ~= source then if bodypart == 4 and weapon == 22 then setPedStat( killer, 69, getPedStat( killer, 69 ) + 1 ); end elseif killer and killer ~= source then if bodypart == 3 and weapon == 22 then setPedStat( killer, 69, getPedStat( killer, 69 ) + 1 ); end end end );
  2. What about this resource? https://community.multitheftauto.com/in ... ls&id=4871
  3. What's debug says?.
  4. But this resource is exactly as GUIEditor.
  5. setTimer(createExplosion (etc etc etc ), 10000, 1)
  6. Because this is the official dx window resourece and exported functions. And this is exactly what do you want as long as i know. And check of the pictures of the resource, it's all dx.
  7. Yes it's, my friend "3NAD" the arabic section moderator is using this function. You can go and ask him.
  8. getElementPosition (player) setElementPosition (player,x,y,z-2) setTimer
  9. https://community.multitheftauto.com/ind ... ls&id=2136
  10. Don't edit any script not yours Why not making you script? We will help you. https://wiki.multitheftauto.com/wiki/Slothman/Zombies
  11. When do you want to enable run, and when do you want to disable it?.
  12. But the 1st one is make the code easier for beginner scripter.
  13. As he said, try this. call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Rank") addEventHandler("onPlayerSpawn",root, function() local account = getPlayerAccount(source) local kills = getAccountData(account,"kills") if (kills >= 0) and (kills <= 4) then setElementData(source,"Rank","ranks/1.png") elseif (kills >= 5) and (kills <= 99) then setElementData(source,"Rank","ranks/2.png") elseif (kills >= 100) and (kills <= 249) then setElementData(source,"Rank","ranks/3.png") elseif (kills >= 250) and (kills <= 499) then setElementData(source,"Rank","ranks/4.png") elseif (kills >= 500) and (kills <= 999) then setElementData(source,"Rank","ranks/5.png") elseif (kills >= 1000) and (kills <= 1499) then setElementData(source,"Rank","ranks/6.png") elseif (kills >= 1500) and (kills <= 1999) then setElementData(source,"Rank","ranks/7.png") elseif (kills >= 2000) and (kills <= 2999) then setElementData(source,"Rank","ranks/8.png") elseif (kills >= 3000) and (kills <= 3999) then setElementData(source,"Rank","ranks/9.png") end end ) addEventHandler("onPlayerSpawn",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local Rank = getAccountData(account,"Rank") if Rank then setElementData(source,"Rank", Rank) end end ) If it doesn't work, what is debug says?.
  14. When do you wanna play the sound?.
  15. Lol, how noob am i try this: function design () playSound ("http://www.181.fm/winamp.pls?station=181-power&style=&description=Power%20181%20(Top%2040)&file=181-power.pls") showCursor ( true ) -- Panels -- local panels = { ["bg"] = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "img/bg.png", true), ["acc"] = guiCreateStaticImage(0.29, 0.24, 0.14, 0.22, "img/acc.png", true), ["boxid"] = guiCreateStaticImage(0.43, 0.30, 0.23, 0.06, "img/box.png", true), ["boxpass"] = guiCreateStaticImage(0.43, 0.36, 0.23, 0.06, "img/box.png", true), } -- Panels -- -- guiSetEnabled -- guiSetEnabled ( panels["bg"], false ) guiSetEnabled ( panels["acc"], false ) guiSetEnabled ( panels["boxid"], false ) guiSetEnabled ( panels["boxpass"], false ) -- guiSetEnabled -- -- Labels -- name = guiCreateLabel(0.45, 0.24, 0.21, 0.03,getPlayerName( localPlayer ):gsub("#%x%x%x%x%x%x", "") .."", true, bg) state = guiCreateLabel(0.45, 0.27, 0.23, 0.03, "Unlogged", true, bg) -- Labels -- -- Settings -- local font = guiCreateFont( "lithos.ttf", 13 ) local font2 = guiCreateFont( "lithos.ttf", 18 ) guiSetFont( name, font2 ) guiSetFont( state, font ) -- Settings -- -- Buttons -- local buttons = { ["btn"] = guiCreateStaticImage(0.628, 0.37, 0.02, 0.032, "img/log.png", true, bg ) } -- Buttons -- -- Alpha -- guiSetAlpha ( buttons["btn"], 0.75 ) -- Alpha -- end addEventHandler( "onClientResourceStart", resourceRoot, design ) addEventHandler( "onClientMouseEnter", getRootElement(), function( ) for key,gui in pairs (buttons) do if source == gui then guiSetAlpha ( source, 1 ) end end end )
  16. No, this is wrong. Source, who hitted the gui .
  17. try: function design ( ) playSound ("http://www.181.fm/winamp.pls?station=181-power&style=&description=Power%20181%20(Top%2040)&file=181-power.pls") showCursor ( true ) -- Panels -- panels = { ["bg"] = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, "img/bg.png", true), ["acc"] = guiCreateStaticImage(0.29, 0.24, 0.14, 0.22, "img/acc.png", true), ["boxid"] = guiCreateStaticImage(0.43, 0.30, 0.23, 0.06, "img/box.png", true), ["boxpass"] = guiCreateStaticImage(0.43, 0.36, 0.23, 0.06, "img/box.png", true), } -- Panels -- -- guiSetEnabled -- guiSetEnabled ( panels, false) -- guiSetEnabled -- -- Labels -- local name = guiCreateLabel(0.45, 0.24, 0.21, 0.03,getPlayerName( localPlayer ):gsub("#%x%x%x%x%x%x", "") .."", true, bg) local state = guiCreateLabel(0.45, 0.27, 0.23, 0.03, "Unlogged", true, bg) -- Labels -- -- Settings -- local font = guiCreateFont( "lithos.ttf", 13 ) local font2 = guiCreateFont( "lithos.ttf", 18 ) guiSetFont( name, font2 ) guiSetFont( state, font ) -- Settings -- -- Buttons -- local buttons = guiCreateStaticImage(0.628, 0.37, 0.02, 0.032, "img/log.png", true, bg ) -- Alpha -- guiSetAlpha ( buttons, 0.75 ) end addEventHandler( "onClientResourceStart", getRootElement( ), design ) -- Handlers -- addEventHandler( "onClientMouseEnter", root, function( ) if localPlayer == buttons then guiSetAlpha ( localPlayer, 1.0 ) end end ) -- Handlers --
  18. Thank you, i never saw it before
  19. Do you mean onClientGuiClick? Because it's my first time to see this event.
×
×
  • Create New...