Raised This Month: $51 Target: $400
 12% 

Only Bots can buy ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr.J
Senior Member
Join Date: Sep 2017
Location: cs_assault
Old 11-01-2017 , 07:35   Only Bots can buy ?
Reply With Quote #1

i need plugin which block all users from buying anything in buyzone.
exept bots , bots can buy pistols, grenades, ....etc
and Real players cant buy ;)
Sorry for my bad english
Mr.J is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 11-01-2017 , 16:14   Re: Only Bots can buy ?
Reply With Quote #2

Code by ConorMcLeod from: https://forums.alliedmods.net/showthread.php?t=177822

I customized it to block the buyzone only for real players. Bots should still be able to buy.

Code:
#include <amxmodx> #include <fakemeta> new g_msgStatusIcon; // Define the Plugin Version new const VERSION[] = "1.0"; public plugin_init() {     register_plugin("Block Buy Menu", VERSION, "Shuttle_Wave/ConnorMcleod")         // Block BuyZone     g_msgStatusIcon = get_user_msgid("StatusIcon");     register_message(g_msgStatusIcon, "msgStatusIcon"); } // Block buyzone (by ConnorMcLeod) public msgStatusIcon(msgid, msgdest, id) {     if(!is_user_bot(id)) {         static szIcon[8];         get_msg_arg_string(2, szIcon, 7);             if(equal(szIcon, "buyzone") && get_msg_arg_int(1))         {             set_pdata_int(id, 235, get_pdata_int(id, 235) & ~(1<<0));             return PLUGIN_HANDLED;         }     }         return PLUGIN_CONTINUE; }
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Old 11-03-2017, 06:12
Mr.J
This message has been deleted by Mr.J. Reason: solved
Mr.J
Senior Member
Join Date: Sep 2017
Location: cs_assault
Old 11-03-2017 , 07:28   Re: Only Bots can buy ?
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
Code by ConorMcLeod from: https://forums.alliedmods.net/showthread.php?t=177822

I customized it to block the buyzone only for real players. Bots should still be able to buy.

Code:
#include <amxmodx> #include <fakemeta> new g_msgStatusIcon; // Define the Plugin Version new const VERSION[] = "1.0"; public plugin_init() {     register_plugin("Block Buy Menu", VERSION, "Shuttle_Wave/ConnorMcleod")         // Block BuyZone     g_msgStatusIcon = get_user_msgid("StatusIcon");     register_message(g_msgStatusIcon, "msgStatusIcon"); } // Block buyzone (by ConnorMcLeod) public msgStatusIcon(msgid, msgdest, id) {     if(!is_user_bot(id)) {         static szIcon[8];         get_msg_arg_string(2, szIcon, 7);             if(equal(szIcon, "buyzone") && get_msg_arg_int(1))         {             set_pdata_int(id, 235, get_pdata_int(id, 235) & ~(1<<0));             return PLUGIN_HANDLED;         }     }         return PLUGIN_CONTINUE; }
Thx its workd !!
Mr.J 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 10:17.


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