AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to disable command buy and model (https://forums.alliedmods.net/showthread.php?t=209455)

Jhob94 02-25-2013 17:03

How to disable command buy and model
 
Hi guys
Can some one tell me how i disable buy and model commands?
About command buy i was wondering about instead of open buy menu show shop menu (say /shop)
About model when someone does like "model gign", doesnt let him change model and print message "You Arent Allowed To Change Your Model In This Server"

CrAsH.94 02-25-2013 19:34

Re: How to disable command buy and model
 
Standard store can be replaced so

Code:

slowhack code removed
Catch replaces the so

Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "BlockModel"
#define VERSION "1.0"
#define AUTHOR "xxx"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
}

public client_infochanged(id)
{
    if(!is_user_connected(id))
        return PLUGIN_CONTINUE

    new szModel[32]
    new szModelDefault[32] = "gordon"

    get_user_info(id, "model", szModel, charsmax( szModel ))

    if(!(equal(szModel, szModelDefault)))
    {
        //YouCode
    }
    return PLUGIN_CONTINUE
}


Jhob94 02-25-2013 20:04

Re: How to disable command buy and model
 
Quote:

Originally Posted by CrAsH.94 (Post 1901986)
Standard store can be replaced so

Code:

slowhack code removed

That is slowhack the client i know do that but i dont like it. For it i would ask client if want bind b for shop and isnt that what i want. I just want cancel effect of open buy menu and using buy command open shop.

Quote:

Originally Posted by CrAsH.94 (Post 1901986)
Catch replaces the so

Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "BlockModel"
#define VERSION "1.0"
#define AUTHOR "xxx"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
}

public client_infochanged(id)
{
    if(!is_user_connected(id))
        return PLUGIN_CONTINUE

    new szModel[32]
    new szModelDefault[32] = "gordon"

    get_user_info(id, "model", szModel, charsmax( szModel ))

    if(!(equal(szModel, szModelDefault)))
    {
        //YouCode
    }
    return PLUGIN_CONTINUE
}


I know that but in my server player is allowed to change skin by /skin and i just want block command model. (Sorry for didnt said it before)

ConnorMcLeod 02-26-2013 12:07

Re: How to disable command buy and model
 
Just register command "buy" with register_clcmd native.
Note that this command is not sent to server when player is not in buyzone.

Jhob94 02-26-2013 14:25

Re: How to disable command buy and model
 
Hum you mean as you made on furien for block it?
I did tried before but didnt worked. It was some month ago, i dont remember for sure, but i think i wasnt in buyzone. But if i make buyzone in entire map and do that, will it work fine?

ConnorMcLeod 02-27-2013 00:34

Re: How to disable command buy and model
 
Yes, should work, if you create buyzone correctly.

Jhob94 02-27-2013 07:42

Re: How to disable command buy and model
 
Thanks :)
If someone can help me blocking model command i really appreciate because in my server they use that command for put models from zombie servers and if others players dont have that model in them models folder it will show gign or other default cs model and i use players models plugin by ConnorMcLeod for an default skin

ConnorMcLeod 02-27-2013 13:20

Re: How to disable command buy and model
 
players models shouldn't allow model change.

Jhob94 02-27-2013 14:17

Re: How to disable command buy and model
 
But i use one extra skin plugin for player can change saying /skin

ConnorMcLeod 02-28-2013 00:28

Re: How to disable command buy and model
 
Then, fix that plugin.


All times are GMT -4. The time now is 21:45.

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