Raised This Month: $ Target: $400
 0% 

Performing multiple commands in an if/then statement


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ELEVENNNN
Junior Member
Join Date: Mar 2007
Old 03-20-2007 , 01:55   Performing multiple commands in an if/then statement
Reply With Quote #1

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

Last edited by ELEVENNNN; 03-20-2007 at 02:18.
ELEVENNNN 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 11:14.


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