Raised This Month: $ Target: $400
 0% 

give_item question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xxxnenadxxx
Junior Member
Join Date: Oct 2010
Location: Brod
Old 10-31-2013 , 02:03   Re: give_item question
Reply With Quote #1

For some reason give_item(id, "weapon_shield") can't be called right after strip_user_weapons function. I used set_task with 0.1 interval to call another public to give shield.
Something like this
PHP Code:
#include <amxmodx>
#include <fun>

public plugin_init() 

    
register_plugin("Plugin""1.0""Author");
    
register_concmd("say /get" "test"ADMIN_BAN);
}

public 
test(id)
{
    
strip_user_weapons(id);
    
    
set_task(0.1"give_shield"id)
    return 
PLUGIN_HANDLED;
}

public 
give_shield(id)
{
    
give_item(id"weapon_knife");
    
give_item(id"weapon_deagle");
    
give_item(id"weapon_shield");
    return 
PLUGIN_HANDLED;

It worked for me

Last edited by xxxnenadxxx; 10-31-2013 at 02:06.
xxxnenadxxx is offline
Reply



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 23:18.


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