Jump to content

Hazard|

Members
  • Posts

    35
  • Joined

  • Last visited

Details

  • Gang
    swag

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Hazard|'s Achievements

Rat

Rat (9/54)

0

Reputation

  1. Hazard|

    Banscript

    Nope, I tested that, and it banned me if my nick was ONLY 'W'. heres my code btw. function banPlayer2 () for _, player in ipairs ( getElementsByType ( "player" ) ) do if getPlayerName ( player ):find ( "%W%il%d" ) then if ( player ) then banPlayer ( player, true ) end end end end addEventHandler ( "onPlayerChangeNick", getRootElement(), banPlayer2) addEventHandler ( "onPlayerJoin", root, banPlayer2)
  2. Hazard|

    Banscript

    Hello guys, I'm creating an autoban script for 2 clans, and I'm having some problem in finding ONLY the clantag. 1st clantag = Wild 2nd clantag = KekZ| if getPlayerName ( player ):find ( "Wild" ) then if getPlayerName ( player ):find ( "KekZ|" ) then Now this result above would ban everyone with a 'W' in their name, or 'K' or '|', doesn't matter really. Well I want it to ban the players with the complete tag, only. So I tried something like this: if getPlayerName ( player ):find ( "%[%Wild%]" ) then if getPlayerName ( player ):find ( "%K%ekZ%|" ) then But that didn't work properly either, can you help me with this? I want it to ban the players who wears the tag only, e.g: KekZ|Randomguy [Wild]Randomguy Thx
  3. Hazard|

    Graphic

    Hello guys, I was just wondering why the graphics are different? Obviously it's the font, but the 1st picture has so much better graphic than the 2nd, why? 1st. http://imgur.com/z6NcMwD,APcjtDk#1 2nd. http://i.imgur.com/z6NcMwD Thanks for replies, really appreciate it.
  4. Hazard|

    20 lines

    EDIT: It's fixed
  5. Hazard|

    20 lines

    It does nothing exactly, but no errors when *trying to mute or unmute. This is just a small part of the code tho, I just want to make the unmutecommand and mutecommand work with same command-name="mmute"
  6. Hazard|

    20 lines

    What's broken: It doesn't output in the chat who I am muting or unmuting, probably because the whole function is broken. That's the problem
  7. Hazard|

    20 lines

    Hello guys, could any of you fix this? no errors, but clearly it's wrong The try is to mute the player, and unmute, with the same command = mmute thx function mutePlayerCommand (thePlayer, command, source) local mutedPlayer = getPlayerFromNamePart ( source ) local source = mutedPlayer local muteData = getElementData( source, "isPlayerMuted" ) if ( hasObjectPermissionTo ( thePlayer, "function.setPlayerMuted", true ) ) then if (mutedPlayer) then if (muteData == true) then if getElementType ( mutedPlayer ) == "player" then setElementData ( source, "isPlayerMuted", false ) outputChatBox ( getPlayerName( source ).." has been unmuted by "..getPlayerName( thePlayer ).." (mainchat only)", root, 33, 255, 95) elseif (muteData == false) then if getElementType ( mutedPlayer ) == "player" then setElementData ( source, "isPlayerMuted", true ) outputChatBox ( getPlayerName( source ).." has been muted by "..getPlayerName( thePlayer ).." (mainchat only)", root, 255, 0, 0) end end end end end end addCommandHandler("mmute", mutePlayerCommand)
  8. Hazard|

    scare

    it works, I just had to put local sw,sh = guigetscreensize () ++++ but it renders the sound too so it sounds so stupid Can you make the sound just replay n replay n replay? not render? thx
  9. Hazard|

    scare

    WARNING: c.lua:4: Bad argument @ 'addEventHandler' [Expected element at argument 2, got function I got this warning now, when I do 'scare playername'
  10. Hazard|

    scare

    Still same error http://imgur.com/ZLXcgT9
  11. Hazard|

    scare

    My meta "" author="" version="1" type="script" /> Is it wrong?
  12. Hazard|

    scare

    ERROR: Server triggered clientside event scareJumpThem, but event is not added clientside
  13. Hazard|

    scare

    Hello, I tried to make something like this before, and didn't reach the goal yet (easy script for you) The issue is that I don't really know how to make this happend only on (theplayer)'s screen. Like if the command to make the sound & picture go off on a players screen, was "scare", and I did /scare Haz then the player with the namepart "Haz" got "scared". The code below is what I have, the scareImage function should be handled by a command named "scare". Can you help? local sw,sh = guiGetScreenSize() function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function scareImage() local scareSound = playSound("scare.mp3") setSoundVolume(scareSound, 1) dxDrawImage(math.random(-5,0),math.random(-5,0),sw+5,sh+5,'scare.jpg',0,0,0,tocolor(255,255,255,math.random(200,240)),true) end --addCommandHandler("scare"?????????????????????????????????????????????????) thx
  14. Hazard|

    (S) kill

    Thank you, works like a charm
  15. Hazard|

    (S) kill

    It works thanks, but the problem is that now it blows all the players with a big S in their nick, I want it to blow the player only if he uses (S) Could you fix it? Thanks!
×
×
  • Create New...