Raised This Month: $ Target: $400
 0% 

detect weapon and run commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
razieljohn619
Senior Member
Join Date: May 2011
Location: Philippines
Old 06-19-2011 , 06:17   Re: detect weapon and run commands
Reply With Quote #1

first my server gives specific weapons to each player depends on what class you have chosen and server has respawn.. what the plugins is supposed to do is when after player spawn it will detect what are the weapons of the player and if that has a weapon(like MP5) the
PHP Code:
public //commands..(id) 
will run and if does not have those weapons the
PHP Code:
public //commands2..(id) 
will run and these commands will run only on that player that is currently check that has these weapons(like MP5) or not..hope you understand because i really want these to work..
__________________

razieljohn619 is offline
Send a message via Yahoo to razieljohn619
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2011 , 06:25   Re: detect weapon and run commands
Reply With Quote #2

Code:
public plugin_init( ) {     RegisterHam( Ham_Spawn, "player", "FwdPlayerSpawnPost", 1 ); } public FwdPlayerSpawnPost( iPlayer ) {     if( is_user_alive( iPlayer ) )     {         if( user_has_weapon( iPlayer, CSW_MP5 ) )         {             // player has mp5         }         else         {             // player does not have mp5         }     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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:26.


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