Raised This Month: $ Target: $400
 0% 

How to disable command buy and model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 02-25-2013 , 17:03   How to disable command buy and model
Reply With Quote #1

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"
__________________

Last edited by Jhob94; 02-25-2013 at 17:05. Reason: fixing text
Jhob94 is offline
CrAsH.94
Junior Member
Join Date: Feb 2013
Old 02-25-2013 , 19:34   Re: How to disable command buy and model
Reply With Quote #2

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
}

Last edited by YamiKaitou; 02-25-2013 at 20:07.
CrAsH.94 is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 02-25-2013 , 20:04   Re: How to disable command buy and model
Reply With Quote #3

Quote:
Originally Posted by CrAsH.94 View Post
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 View Post
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)
__________________

Last edited by YamiKaitou; 02-25-2013 at 20:07.
Jhob94 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-26-2013 , 12:07   Re: How to disable command buy and model
Reply With Quote #4

Just register command "buy" with register_clcmd native.
Note that this command is not sent to server when player is not in buyzone.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 02-26-2013 , 14:25   Re: How to disable command buy and model
Reply With Quote #5

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?
__________________
Jhob94 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-27-2013 , 00:34   Re: How to disable command buy and model
Reply With Quote #6

Yes, should work, if you create buyzone correctly.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 02-27-2013 , 07:42   Re: How to disable command buy and model
Reply With Quote #7

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
__________________
Jhob94 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-27-2013 , 13:20   Re: How to disable command buy and model
Reply With Quote #8

players models shouldn't allow model change.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 02-27-2013 , 14:17   Re: How to disable command buy and model
Reply With Quote #9

But i use one extra skin plugin for player can change saying /skin
__________________
Jhob94 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-28-2013 , 00:28   Re: How to disable command buy and model
Reply With Quote #10

Then, fix that plugin.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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