AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   command (https://forums.alliedmods.net/showthread.php?t=329404)

musab 12-22-2020 12:09

command
 
Hello
I need command for ct players and t players

I disable buy menu
Example Ak47 weapon for terrorists m4 for ct only how i can do it

Sorry, I don't speak English

DJEarthQuake 12-22-2020 15:09

Re: command
 
Quote:

Originally Posted by musab (Post 2729754)
Hello
I need command for ct players and t players

I disable buy menu
Example Ak47 weapon for terrorists m4 for ct only how i can do it

Sorry, I don't speak English

Amxx 182 tested. mp_buyzone 0|1. Switching CVAR applies on next map load.

Code:
/*𝓼𝓹𝓲𝓷𝔁*/ #include <amxmodx>     //system #include <engine>      //create #include <fun>         //gives #include <hamsandwich> //spawn new const munitons[][]= {     "item_assaultsuit",     "weapon_knife",     "weapon_deagle",     "ammo_50ae",     "ammo_50ae",     "ammo_762nato",     "ammo_556nato",     "ammo_50ae",     "ammo_762nato",     "ammo_556nato",     "ammo_50ae",     "ammo_762nato",     "ammo_556nato",     "ammo_50ae" }; new g_buy; public plugin_precache() {     register_plugin("Assault Rifle No Buyzone","0.1","SPiNX|2020");     RegisterHam(Ham_Spawn, "player", "player_spawn", 1);     g_buy = register_cvar("mp_buyzone","1");     if (get_pcvar_num(g_buy))         pause( "a" );     else     {         new Ent = create_entity( "info_map_parameters" );         DispatchKeyValue( Ent, "buying", "3" )         DispatchSpawn( Ent );     } } public player_spawn(id) {     if (is_user_connected(id))     {         strip_user_weapons(id);         for(new box; box < sizeof munitons; ++box)            give_item(id,munitons[box]);         if( get_user_team(id) == 1 )             give_item(id,"weapon_ak47");         else             give_item(id, "weapon_m4a1");     } }

musab 12-24-2020 08:19

Re: command
 
thank you

DJEarthQuake 12-28-2020 12:59

Re: command
 
Quote:

Originally Posted by musab (Post 2729951)
thank you

You're welcome musab. Glad script does the trick. Did you develop it further?


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

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