Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×
  • 0

Little python check question



  • Premium

Hey guys,


is here someone who know how to do a Game Master check for CTRL+V function? File: root\game.py

def OnKeyDown(self, key):
        if app.DIK_F1 == key:
            return False
        if app.DIK_F2 == key:
            return False
        if app.DIK_F3 == key:
            return False
        if app.DIK_F4 == key:
            return False
        if app.DIK_LALT == key:
            return False
        if app.DIK_SYSRQ == key:
            return False
        if app.DIK_LCONTROL == key:
            return False
        if app.DIK_V == key:
            if app.IsPressed(app.DIK_LCONTROL):

Thanks for possible solutions!

Edited by ReFresh

I'll be always helpful! 👊 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1
  • Distinguished Member

Idk why chr.IsGameMaster don't work for you, but here is another solution:

if app.DIK_V == key:
	if app.IsPressed(app.DIK_LCONTROL) and str(player.GetName())[0] == "[":

It will check if the player name starts with "[". If you have [VIP] or other role then edit the code to exclude them.

chr.IsGameMaster is better but since it's clientside, it really doesn't matter, the pro users can reach and modify it anyways.

Edited by TMP4
  • Love 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Activity

    1. 0

      Need Help With Char_Item.cpp

    2. 0


    3. 7

      Killua - Unholy God Set

    4. 2

      Visual studio 2022 compiling issue

    5. 991

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

  • Recently Browsing

    • No registered users viewing this page.
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.