AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with awpme script! (https://forums.alliedmods.net/showthread.php?t=74888)

Kitami 07-26-2008 18:18

Help with awpme script!
 
There is a glitch where if you type in amx_awpme and you have the bomb it will take away your bomb. Or if you have a kit it will take away your kit.

Is someone could please excempt those two items from being removed when checking for guns.

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define PLUGIN "give awp"
#define VERSION "1.0"
#define AUTHOR "Reaper2331"

#define AMX_ADMIN_FLAG ADMIN_VOTE

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_concmd("amx_awpme","checkGuns",AMX_ADMIN_FLAG,"- Gives Admins with Flag J an Awp")
    
}
public 
checkGuns(idlevelcid)
{
    if( !
cmd_accessidlevelcid) )
        return 
PLUGIN_HANDLED

    
if (is_user_alive(id) )
   {
    
strip_user_weapons(id)
    
    
give_item(id,"weapon_knife")
    
give_item(id,"weapon_awp")
    
give_item(id,"ammo_338magnum")
    
give_item(id,"ammo_338magnum")
    
give_item(id,"ammo_338magnum")
    
give_item(id,"weapon_deagle")
    
give_item(id,"ammo_50ae")
    
give_item(id,"ammo_50ae")
    
give_item(id,"ammo_50ae")
    
give_item(id,"ammo_50ae")
    
give_item(id,"ammo_50ae")
    
give_item(id,"ammo_50ae")
    
give_item(id,"ammo_50ae")
    
give_item(id,"weapon_hegrenade")
    
give_item(id,"weapon_smokegrenade")
    
give_item(id,"weapon_flashbang")
    
give_item(id,"weapon_flashbang")
    
    
client_print(idprint_chat"[AMXX] You Now Have An Awp Enjoy")
    }
    return 
PLUGIN_CONTINUE



hleV 07-26-2008 18:25

Re: Help with awpme script!
 
Use below one.

Exolent[jNr] 07-26-2008 18:31

Re: Help with awpme script!
 
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define PLUGIN "give awp"
#define VERSION "1.0"
#define AUTHOR "Reaper2331"

#define AMX_ADMIN_FLAG ADMIN_VOTE

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_concmd("amx_awpme","checkGuns",AMX_ADMIN_FLAG,"- Gives Admins with Flag J an Awp")
    
}
public 
checkGuns(idlevelcid)
{
    if( !
cmd_access(idlevelcid1) )
        return 
PLUGIN_HANDLED

    
if ( is_user_alive(id) )
    {
        new 
kit cs_get_user_defuse(id)
        new 
bomb user_has_weapon(idCSW_C4)
        
        
strip_user_weapons(id)
        
        if( 
kit cs_set_user_defuse(id1)
        if( 
bomb give_item(id"weapon_c4")
        
        
give_item(id,"weapon_knife")
        
give_item(id,"weapon_awp")
        
give_item(id,"ammo_338magnum")
        
give_item(id,"ammo_338magnum")
        
give_item(id,"ammo_338magnum")
        
give_item(id,"weapon_deagle")
        
give_item(id,"ammo_50ae")
        
give_item(id,"ammo_50ae")
        
give_item(id,"ammo_50ae")
        
give_item(id,"ammo_50ae")
        
give_item(id,"ammo_50ae")
        
give_item(id,"ammo_50ae")
        
give_item(id,"ammo_50ae")
        
give_item(id,"weapon_hegrenade")
        
give_item(id,"weapon_smokegrenade")
        
give_item(id,"weapon_flashbang")
        
give_item(id,"weapon_flashbang")
        
        
client_print(idprint_chat"[AMXX] You Now Have An Awp Enjoy")
    }
    return 
PLUGIN_CONTINUE


Note: hleV's will not work for defuse kits, and will only work if player is holding the bomb when the awp is given.

Kitami 07-26-2008 19:34

Re: Help with awpme script!
 
Thanks alot Baby

Kitami 07-27-2008 02:39

Re: Help with awpme script!
 
Is there anyway to have it just strip the main gun from the person? not all the weapons.

Exolent[jNr] 07-27-2008 03:20

Re: Help with awpme script!
 
Well, it gives them a deagle and an awp.

{PHILMAGROIN} 07-27-2008 03:38

Re: Help with awpme script!
 
Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define PLUGIN "give awp"
#define VERSION "1.0"
#define AUTHOR "Reaper2331"

#define AMX_ADMIN_FLAG ADMIN_VOTE

Code:

public plugin_init() {
   
register_plugin(PLUGIN, VERSION, AUTHOR)
   
register_concmd("amx_awpme","checkGuns",AMX_ADMIN_FLAG,"- Gives Admins with Flag J an Awp")
   
}


Code:

public dropcurweapon(id){
    engclient_cmd(id, "drop", "weapon_shield")
    engclient_cmd(id, "drop", "weapon_m3")
    engclient_cmd(id, "drop", "weapon_xm1014")
    engclient_cmd(id, "drop", "weapon_mp5navy")   
    engclient_cmd(id, "drop", "weapon_p90")
    engclient_cmd(id, "drop", "weapon_mac10")
    engclient_cmd(id, "drop", "weapon_tmp")
    engclient_cmd(id, "drop", "weapon_ump45")
    engclient_cmd(id, "drop", "weapon_galil")
    engclient_cmd(id, "drop", "weapon_famas")   
    engclient_cmd(id, "drop", "weapon_m4a1")
    engclient_cmd(id, "drop", "weapon_aug")
    engclient_cmd(id, "drop", "weapon_ak47")
    engclient_cmd(id, "drop", "weapon_sg552")
    engclient_cmd(id, "drop", "weapon_scout")
    engclient_cmd(id, "drop", "weapon_awp")
    engclient_cmd(id, "drop", "weapon_sg550")
    engclient_cmd(id, "drop", "weapon_g3sg1")
    engclient_cmd(id, "drop", "weapon_m249")
}


public
checkGuns(id, level, cid)
{
    if( !
cmd_access(id, level, cid, 1) )
        return
PLUGIN_HANDLED

   
if ( is_user_alive(id) )
    {

        dropcurweapon(id)
       
give_item(id,"weapon_knife")
       
give_item(id,"weapon_awp")
       
give_item(id,"ammo_338magnum")
       
give_item(id,"ammo_338magnum")
       
give_item(id,"ammo_338magnum")
       
give_item(id,"weapon_deagle")
       
give_item(id,"ammo_50ae")
       
give_item(id,"ammo_50ae")
       
give_item(id,"ammo_50ae")
       
give_item(id,"ammo_50ae")
       
give_item(id,"ammo_50ae")
       
give_item(id,"ammo_50ae")
       
give_item(id,"ammo_50ae")
       
give_item(id,"weapon_hegrenade")
       
give_item(id,"weapon_smokegrenade")
       
give_item(id,"weapon_flashbang")
       
give_item(id,"weapon_flashbang")
       
       
client_print(id, print_chat, "[AMXX] You Now Have An Awp Enjoy")
    }
    return PLUGIN_HANDLED
}



dont know why they are split up but i think this works


Kitami 07-27-2008 17:31

Re: Help with awpme script!
 
You have to change the tags to [PHP] so I can copy it and compile it, but thanks alot.

{PHILMAGROIN} 07-29-2008 14:33

Re: Help with awpme script!
 
1 Attachment(s)
Here you go. havent tested it.

Kitami 08-01-2008 20:59

Re: Help with awpme script!
 
It works great, can you please just make it just give you an awp with ammo, no deagle or nades etc. I would do it but I cant copy your code from here :(


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

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