AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how to restrict all weapons only for 1 player? (https://forums.alliedmods.net/showthread.php?t=94920)

One 06-17-2009 06:37

how to restrict all weapons only for 1 player?
 
tittle.

hleV 06-17-2009 06:44

Re: how to restrict all weapons only for 1 player?
 
Should work.
Code:
#include <amxmodx>   new g_bHasWeapsRestricted[33];   public plugin_init()         register_event("CurWeapon", "eventCurWeapon", "be", "1=1");   public fnSomeFunc(iCl)         g_bHasWeapsRestricted[iCl] = true;   public eventCurWeapon(iCl)         if (g_bHasWeapsRestricted[iCl] && read_data(2) != CSW_KNIFE)                 engclient_cmd(iCl, "drop");

xPaw 06-17-2009 06:44

Re: how to restrict all weapons only for 1 player?
 
http://forums.alliedmods.net/showthread.php?p=691809
Search rules ?

One 06-17-2009 07:03

Re: how to restrict all weapons only for 1 player?
 
1. ty but this not work.
2. i found this one, but its not what i want :( need just a simple restrict that i can use in my if.

if this & this
restrict all weapon(id)

:(

hleV 06-17-2009 07:05

Re: how to restrict all weapons only for 1 player?
 
Code:
if (this && this)         g_bHasWeapsRestricted[id] = true;
or
Code:
stock fnRestrictWeaps(id, status)         g_bHasUserWeapsRestricted[id] = status;

One 06-17-2009 07:30

Re: how to restrict all weapons only for 1 player?
 
CS crash & nothing in log :(

Bugsy 06-17-2009 08:30

Re: how to restrict all weapons only for 1 player?
 
I can add an all-weapons command:

http://forums.alliedmods.net/showthread.php?t=78116


All times are GMT -4. The time now is 15:34.

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