Raised This Month: $ Target: $400
 0% 

Operators


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
vamppa
Senior Member
Join Date: Apr 2010
Location: The Netherlands
Old 07-29-2013 , 16:49   Re: Operators
Reply With Quote #3

PHP Code:
public plugin_init() 

    
register_clcmd("drop","anticrashserver"
}
public 
anticrashserver(id

      new 
num
      new 
weapons[32]; 
      
get_user_weapons(idweaponsnum); 
      if (
num == 1
      { 
              if (
num 0)  
              return 
PLUGIN_HANDLED
      } 
      return 
PLUGIN_CONTINUE;

something like this.
I am trying to force the client to have at least 1 weapon in his/her hand.
which should work with just
PHP Code:
num == 
however we have snarks,satchels and tripmines which are not recognized by amxmodx as part of the weapon index.
so Im first trying to isolate if it is 1 weapon.
then if it is one weapon I will disable the ability to drop by checking if its > 0.
so people wouldn't be able to drop further if they got an snarks,satchels,tripmines with 1 weapon in hand.
but I dont know how to check the same value against two different operators, if possible.

Last edited by vamppa; 07-29-2013 at 19:23.
vamppa 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 15:52.


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