Raised This Month: $ Target: $400
 0% 

Wont give item


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 11-03-2013 , 06:10   Re: Wont give item
Reply With Quote #4

Quote:
Originally Posted by Blizzard_87 View Post
you need to delay giving items if its on round start / round spawn.
Or just remove the entity that strips player weapons and the entity which gives the weapons, then give the weapons manually using a plugin
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <fun>

new Trie:g_hClassNames
new g_iForward

public plugin_precache()
{
    new 
szMap[30]
    
get_mapname(szMapcharsmax(szMap))
    
    if(!
equali(szMap"scoutzknivez"))
    {
        
log_amx("Stopped plugin as map is not scoutzknivez")
        return;
    }
    
    
g_hClassNames TrieCreate()
    
    
TrieSetCell(g_hClassNames"game_player_equip"1)
    
TrieSetCell(g_hClassNames"player_weaponstrip"1)
    
    
g_iForward register_forward(FM_Spawn"fw_EntSpawn"0)
}

public 
fw_EntSpawn(iEnt)
{
    static 
szClassName[32]
    
pev(iEntpev_classnameszClassNamecharsmax(szClassName))
    
    if(
TrieKeyExists(g_hClassNamesszClassName))
    {
        
server_print("*** Ent Removed  %s ***"szClassName)
        
engfunc(EngFunc_RemoveEntityiEnt)
        return 
FMRES_SUPERCEDE
    
}
    
    return 
FMRES_IGNORED
}

public 
plugin_init()
{
    
unregister_forward(FM_Spawng_iForward0)
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn"1)
}

public 
fw_PlayerSpawn(id)
{
    if(!
is_user_alive(id))
    {
        return;
    }
    
    
strip_user_weapons(id)
    
give_item(id"weapon_knife")
    
give_item(id"weapon_scout")
    
give_item(id"weapon_hegrenade")

__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
pokemonmaster 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 23:15.


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