Jump to content

oggygod

Members
  • Content Count

    252
  • Joined

  • Last visited

Community Reputation

8 Neutral

About oggygod

  • Rank
    Red-Headed Stepchild

Recent Profile Visitors

743 profile views
  1. -- var 1 function paymoney(player,cmd, ...) for i, v in ipairs(getElementsByType("player")) do if #({...}) == 0 then outputChatBox ("Empty Message",v,255,255,255,false) else --if amount == nil then --outputChatBox ("Type Amount",v,255,255,255,false) --else -- --end end end end addCommandHandler("pay",paymoney) -- var 2 function paymoney(player,cmd, amount) for i, v in ipairs(getElementsByType("player")) do if amount == nil then outputChatBox ("Type Amount",v,255,255,255,false) else -- end end end addCommandHandler("pay",paymoney) In the first option, a check is made for an empty message,
  2. oggygod

    check jump

    function playerPressedKey(button, press) if (button == "lshift" and press) then if getPedControlState(localPlayer,"jump") == true then outputChatBox("jump", 0, 255, 0) end end end addEventHandler("onClientKey", root, playerPressedKey) Jump bind to keys "lshift" and "rctrl" How do I make a jump check? For example, I pressed the button "lshift" and checks whether the player jumped or not. need an instant check. I pressed the button and writes that the player has jumped or not. Now it works like this. If you press "lshift" Nothing happens but if you hold down the but
  3. That's right, thanks for the help
  4. Can I remove chat notification in chat like this " Oggy_Slaps is now known as hip" ? I want that when a player's nickname changes, this message does not appear in the chat.
  5. That's what I need, you have solved my problem. Thank you
  6. Can i remove the standart text "say: You are muted" when is the player muted?
  7. oggygod

    chat

    @Tekken Thank you for your responsiveness, but not working. Any other suggestions? function chatDetect(message,mstype, ...) if mstype == 1 then sendMessage(source,"me",message) cancelEvent() end end addEventHandler("onPlayerChat",root,chatDetect) function sendMessage(player,cmd,...) local distance local x,y,z = getElementPosition(player) local nick = getPlayerName(player) local message = table.concat( {...}, " ") if ... then --With this line, I solved the problem, but not for "me"; if cmd == "me" then outputChatBox("* "..nick.." "..message,player,247,97,224,false) elseif cmd == "do"
  8. oggygod

    chat

    function chatDetect(message,mstype, ...) if mstype == 1 then sendMessage(source,"me",message) cancelEvent() -- if ... then outputChatBox ( "not message", v, 255, 125, 125, true ) end -- end end addEventHandler("onPlayerChat",root,chatDetect) function sendMessage ( player, cmd, ... ) local message = table.concat( {...}, " ") for i, v in ipairs ( getElementsByType( "player" ) ) do local x, y, z = getElementPosition ( player ) local xt, yt, zt = getElementPosition ( v ) if getDistanceBetweenPoints3D ( x, y, z, xt, yt, zt ) <= 10 then outputChatBox ( "** "..message.." ("..getP
  9. oggygod

    utf8.match

    This is what I need, thanks for the help.
  10. oggygod

    utf8.match

    if not utf8.match(edit,"^%u") then -- the first letter not capitalized end How to make a check that all letters are small? I have some code that checks if the first letter is capitalized. But I still don't understand how to use it back. At least some examples are needed. Where can I read more about this?
  11. oggygod

    button

    Yes of course. How can I open a window differently if I don't call it Maybe I misunderstand something, but I do it like this: function window() window = guiCreateWindow((sW - 406) / 2, (sH - 461) / 2, 455, 465, "Window", false) windowbutton1 = guiCreateButton(330, 432, 118, 22, "butt", false, window) end function start() window() end addCommandHandler ( "w", start ) function myFunction() outputChatBox ("test", 231,217,176,false ) end addCommandHandler("z",myFunction) addEventHandler("onClientGUIClick",windowbutton1,myFunction,false)
  12. oggygod

    button

    OK, thank you. Everything works with your code. But I'm trying to use my button, which is in another window, and I can't get it to work. function window() window = guiCreateWindow((sW - 406) / 2, (sH - 461) / 2, 455, 465, "Window", false) windowbutton1 = guiCreateButton(330, 432, 118, 22, "butt", false, window) end function myFunction() outputChatBox ("test", 231,217,176,false ) end addCommandHandler("z",myFunction) addEventHandler("onClientGUIClick",windowbutton1,myFunction,false) I press the button and nothing happens
  13. oggygod

    button

    not errors in debug
  14. oggygod

    button

    local mybutton = guiCreateButton(1000, 200, 75, 30, "ACC", false) addEventHandler("onClientGUIClick",mybutton,myFunction,false) function myFunction() outputChatBox ("test", 231,217,176,false ) end addCommandHandler("z",myFunction) I misunderstood something? Using the command /z I get the text in the chat (test) but when I press the button. Nothing happens I just wrote a button click differently in the code(1 post in this topic), and now I don't know how to write it correctly.
  15. oggygod

    button

    Can you please give an example of this action in the code?
×
×
  • Create New...