AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   AWP, G3SG1 & SG550 replacer; implement a concmd (https://forums.alliedmods.net/showthread.php?t=27980)

RCC|Dynamite 05-04-2006 06:58

AWP, G3SG1 & SG550 replacer; implement a concmd
 
It wanne add a concmd so that it can specify what guns to replace what.

Like:

amx_ng_replace awp ak47
amx_ng_replace g3sg1 mac10

That would make this plugin more flexible.

I have implement admin immunity and any warning messages, to notify the players that those weapons are not allowed.

can someone help me to realize it?

Code:
#include <amxmodx>     #include <amxmisc>     #include <fun>     #define ADMIN_LEVEL ADMIN_CHAT public check_noobguns(id)     {         if(get_cvar_num("amx_nonoobguns") != 1 || !is_user_alive(id))     if(get_cvar_num("sv_allow_admin_awp") == 1 && access(id, ADMIN_LEVEL))     if(get_cvar_num("sv_allow_admin_auto") == 1 && access(id, ADMIN_LEVEL))     if(get_cvar_num("sv_allow_admin_sg550") == 1 && access(id, ADMIN_LEVEL))           return PLUGIN_CONTINUE         new weap = read_data(1)         if(weap == 18 || weap == 24 || weap == 13)         {             new params[2]             params[0] = id             params[1] = weap                     set_task(0.1, "drop_noobguns", id , params , 2)         }               return PLUGIN_CONTINUE     }     public drop_noobguns(params[2])     {         new id = params[0]         new weap = params[1]         new origin[3]         get_user_origin(id, origin, 0)         origin[2] -= 2000         set_user_origin(id, origin)         switch(weap)         {             case CSW_AWP:         {             engclient_cmd(id, "drop", "weapon_awp")                 give_item(id, "weapon_scout")                 give_item(id, "ammo_762nato")             client_print(id, print_center, "AWP's are not allowed. Here you have a real gun!")           }         case CSW_G3SG1:         {             engclient_cmd(id, "drop", "weapon_g3sg1")             give_item(id, "weapon_mac10")             give_item(id, "ammo_762nato")             client_print(id, print_center, "G3SG1's are not allowed. Here you have a real gun!")         }         case CSW_SG550:         {             engclient_cmd(id, "drop", "weapon_sg550")             give_item(id, "weapon_tmp")                 give_item(id, "ammo_762nato")             client_print(id, print_center, "SG550's are not allowed. Here you have a real gun!")         }     }             origin[2] += 2001         set_user_origin(id, origin)     } public plugin_init()     {         register_plugin("Nonoobguns", "0.1", "Allenwr")         register_event("WeapPickup", "check_noobguns", "b")         register_cvar("amx_nonoobguns", "1")     register_cvar("sv_allow_admin_g3sg1", "0")     register_cvar("sv_allow_admin_sg550", "0")     register_cvar("sv_allow_admin_awp", "0")         return PLUGIN_CONTINUE }

allenwr 05-04-2006 11:54

hey, wanna work with me on this? instead of doing it on your own?

RCC|Dynamite 05-04-2006 17:51

i donīt wanne steal it an wanne up-date for myself

allenwr 05-04-2006 19:56

never said anything about stealing.

RCC|Dynamite 05-06-2006 07:46

^^ allenwr it is done?

allenwr 05-06-2006 16:43

if you have been watching the nonoobguns thread, you would see that we are close (we as in people who are helping me).

just needs more work.


All times are GMT -4. The time now is 05:13.

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