Raised This Month: $ Target: $400
 0% 

Finding out how long button is pressed & + command


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 05-19-2005 , 22:28  
Reply With Quote #2

Try something like this, not sure exactly what you want tho..
Code:
#include <amxmodx> #define UNIQUE_TASK_ID 7656 public plugin_init() {     register_clcmd( "+command","PlusCommand" )     register_clcmd( "-command","MinusCommand" ) } public PlusCommand( id ) {     new args[2]     args[1] = id     set_task(1.0, "LoopFunction", UNIQUE_TASK_ID + id, args, 1, "b" );     return PLUGIN_HANDLED } public MinusCommand( id ) {     if( task_exists( UNIQUE_TASK_ID + id ) )         remove_task( UNIQUE_TASK_ID + id )     return PLUGIN_HANDLED } public LoopFunction( args[] ) {     new id = args[0];     // do stuff with player id here...     client_print( id, print_chat, "Test Message.." )     return PLUGIN_HANDLED }
xeroblood is offline
Send a message via MSN to xeroblood
 



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


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