AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   BM Noclip ON? (https://forums.alliedmods.net/showthread.php?t=94597)

infek 06-13-2009 01:52

BM Noclip ON?
 
Can any one help me when some one turns on NOclip or Godmode with BlockMaker it'll say
Name Activated Godmode
Name Disabled Godmode
Name Activated Noclip
Name Disabled Noclip

cikjam 06-13-2009 05:38

Re: BM Noclip ON?
 
I got this from my blockmaker
Change this:
Code:

toggleGodmode(id)
{
    //make sure player has access to this command
    if (get_user_flags(id) & BM_ADMIN_LEVEL)
    {
        //if player has godmode
        if (get_user_godmode(id))
        {
            //turn off godmode for player
            set_user_godmode(id, 0);
            gbAdminGodmode[id] = false;
        }
        else
        {
            //turn on godmode for player
            set_user_godmode(id, 1);
            gbAdminGodmode[id] = true;
        }
    }
}

toggleNoclip(id)
{
    //make sure player has access to this command
    if (get_user_flags(id) & BM_ADMIN_LEVEL)
    {
        //if player has noclip
        if (get_user_noclip(id))
        {
            //turn off noclip for player
            set_user_noclip(id, 0);
            gbAdminNoclip[id] = false;
        }
        else
        {
            //turn on noclip for player
            set_user_noclip(id, 1);
            gbAdminNoclip[id] = true;
        }
    }
}

to this

Code:

toggleGodmode(id)
{
    new szName[32];
    get_user_name(id, szName, 32);
   
    //make sure player has access to this command
    if (get_user_flags(id) & BM_ADMIN_LEVEL)
    {
        //if player has godmode
        if (get_user_godmode(id))
        {
            //turn off godmode for player
            set_user_godmode(id, 0);
            gbAdminGodmode[id] = false;
           
            client_print(0, print_chat, "%s Has Disabled Godmode", szName);
        }
        else
        {
            //turn on godmode for player
            set_user_godmode(id, 1);
            gbAdminGodmode[id] = true;
           
            client_print(0, print_chat, "%s Has Enabled Godmode", szName);
        }
    }
}

toggleNoclip(id)
{
    new szName[32];
    get_user_name(id, szName, 32);
   
    //make sure player has access to this command
    if (get_user_flags(id) & BM_ADMIN_LEVEL)
    {
        //if player has noclip
        if (get_user_noclip(id))
        {
            //turn off noclip for player
            set_user_noclip(id, 0);
            gbAdminNoclip[id] = false;
           
            client_print(0, print_chat, "%s Has Disabled Noclip", szName);
        }
        else
        {
            //turn on noclip for player
            set_user_noclip(id, 1);
            gbAdminNoclip[id] = true;
           
            client_print(0, print_chat, "%s Has Enabled Noclip", szName);
        }
    }
}


infek 06-13-2009 22:47

Re: BM Noclip ON?
 
ty dude


All times are GMT -4. The time now is 13:52.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.