View Single Post
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 06-03-2021 , 18:28   Re: [REQ] mp_give_player_c4 for CZ
Reply With Quote #3

Try this:
Untested...
Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta_util> #define PLUGIN "Give player c4" #define VERSION "1.0" #define AUTHOR "Supremache" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_concmd("amx_givec4", "GiveC4", ADMIN_LEVEL_E, " <player>"); } public GiveC4(id, iLevel, iCid) {     if(cmd_access(id, iLevel, iCid, 1))     {         static cTarget[32], iTarget                 read_argv( 1, cTarget, charsmax(cTarget));                 iTarget = cmd_target( id, cTarget, CMDTARGET_ALLOW_SELF | CMDTARGET_NO_BOTS );                 if(!iTarget)         {             console_print(id, "Invalid player or matching multiple targets!");             return PLUGIN_HANDLED         }                 // Is bomb carried/who is the carrier?         new carrier = 0, ownerent, bomb = fm_find_ent_by_class(-1, "weapon_c4")         if (bomb && (ownerent = pev(bomb, pev_owner)) <= get_maxplayers())         carrier = ownerent                 if (carrier) // we have the carrier             fm_transfer_user_gun(carrier, iTarget, CSW_C4)         else  // we do not have a carrier             fm_give_item(iTarget, "weapon_c4")         return PLUGIN_HANDLED             }     return PLUGIN_HANDLED }
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 06-03-2021 at 18:30.
Supremache is offline