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

Last plugin I need for my Furien server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
valio_skull
Senior Member
Join Date: Jan 2013
Location: at home
Old 12-09-2015 , 09:58   Last plugin I need for my Furien server
Reply With Quote #1

Hello, I need one more plugin for my server. I need a plugin that:
- Blocks the buy, rebuy and autobuy commands for both CT and T teams
- Blocks Terrorists (Furiens) from Picking weapons and from switching to slot1 (primary) and slot2(secondary)
Please, those things are vital for the furien server.
Thanks in advice.

Edit: I'm using this to block Ts from picking guns https://forums.alliedmods.net/showthread.php?p=950174
But I still need to block "buy, rebuy and autobuy" commands from all.
Terrorists can buy revolver, but they instantly drop it, and a ct can come in the T spawn and pick it up
And the CTs can buy other weapons than those in my guns plugin
__________________

Last edited by valio_skull; 12-09-2015 at 10:30. Reason: ...
valio_skull is offline
lingzhidiyu
Senior Member
Join Date: Mar 2014
Old 12-09-2015 , 10:55   Re: Last plugin I need for my Furien server
Reply With Quote #2

PHP Code:
public void OnClientPutInServer(int client) {
    
SDKHook(clientSDKHook_WeaponEquipOnWeaponCanUse);
}

public 
Action OnWeaponCanUse(int clientint weapon) {
    
char name[32];
    if (
GetEntityClassname(weaponnamesizeof(name))) {
        if (
StrEqual(name"weapon_knife"true) || StrEqual(name"weapon_c4"true)) {
            return 
Plugin_Continue;
        }
    }

    return 
Plugin_Handled;
}

public 
Action CS_OnBuyCommand(client, const String:weapon[]) {
    return 
Plugin_Handled;


Last edited by lingzhidiyu; 12-09-2015 at 10:55.
lingzhidiyu is offline
valio_skull
Senior Member
Join Date: Jan 2013
Location: at home
Old 12-09-2015 , 14:45   Re: Last plugin I need for my Furien server
Reply With Quote #3

Quote:
Originally Posted by lingzhidiyu View Post
PHP Code:
public void OnClientPutInServer(int client) {
    
SDKHook(clientSDKHook_WeaponEquipOnWeaponCanUse);
}

public 
Action OnWeaponCanUse(int clientint weapon) {
    
char name[32];
    if (
GetEntityClassname(weaponnamesizeof(name))) {
        if (
StrEqual(name"weapon_knife"true) || StrEqual(name"weapon_c4"true)) {
            return 
Plugin_Continue;
        }
    }

    return 
Plugin_Handled;
}

public 
Action CS_OnBuyCommand(client, const String:weapon[]) {
    return 
Plugin_Handled;

I already solved that, now I need to block buy commands
__________________
valio_skull is offline
valio_skull
Senior Member
Join Date: Jan 2013
Location: at home
Old 12-09-2015 , 15:00   Re: Last plugin I need for my Furien server
Reply With Quote #4

nvm, I will delete the weapon menu plugin and I will leave the deefault buy menu...
__________________
valio_skull 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:53.


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