Raised This Month: $ Target: $400
 0% 

Solved [REQ] mp_give_player_c4 for CZ


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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 #6

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
 



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 19:58.


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