Raised This Month: $ Target: $400
 0% 

scripting help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-05-2007 , 05:11   scripting help
Reply With Quote #1

Hi, i need an example to check when an player press "USE" on an hostage. And after i will add stuff..

Thanks
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-05-2007 , 07:55   Re: scripting help
Reply With Quote #2

Code:
#include <amxmodx> #include <fakemeta> public plugin_init() {     register_plugin("", "", "")     register_forward(FM_PlayerPreThink, "FM_PreThink") } public FM_PreThink(id) {         new temp, target, classname[32]         if ( pev(id, pev_button) & IN_USE && ! ( pev(id, pev_oldbuttons) & IN_USE ) ) {                 get_user_aiming(id, target, temp)                 if ( ! pev_valid(target) )             return FMRES_HANDLED                 pev(target, pev_classname, classname, 31)                 if ( equal(classname, "hostage_entity") ) {             // You're aiming at an hostage and pressing use.         }     }     return FMRES_HANDLED }

Last edited by [ --<-@ ] Black Rose; 02-05-2007 at 07:57.
[ --<-@ ] Black Rose is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-05-2007 , 08:20   Re: scripting help
Reply With Quote #3

thanks man
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
Reply


Thread Tools
Display Modes

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 00:38.


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