Hey.. Trying to get some help with the following code... (line 17) if(!invis[id]) I want to use get_user_weapon (i think) or whatever command I would need to determine if they are using a knife... so:
if invis is exec'd and the weapon is knife then perform the following functions:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#include <cstrike>
new bool:invis[33]
public plugin_init()
{
register_plugin("mod","1.0","author")
register_clcmd("goinvis","hook_goinvis")
}
public hook_goinvis(id)
{
if(!invis[id])
{
invis[id]=true
set_task(5.0,"un_invis",id)
set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderTransAlpha,0)
client_print(id, print_chat, "You are now invisable.")
set_user_footsteps(id, 1)
}
return PLUGIN_HANDLED
}
public un_invis(id)
{
invis[id]=false
set_user_rendering(id)
client_print(id, print_chat, "You are now visible again.")
set_user_footsteps(id, 0)
}
How would we go about doing that, thanks everyone who answers in advanced
-Kurt