Raised This Month: $ Target: $400
 0% 

Register "+command" from client?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
mlar98
Junior Member
Join Date: Mar 2012
Location: Lima, Peru
Old 01-27-2014 , 07:00   Re: Register "+command" from client?
Reply With Quote #10

Quote:
Originally Posted by DavidJr View Post
PHP Code:
RegisterHam(Ham_Weapon_Reload"weapon_*""fwd_Weapon_Reload"); 
PHP Code:
public fwd_Weapon_Reload(iEnt)
{
return 
HAM_SUPERCEDE;

weapon_* is your weapon entity.
THANK YOU! Now I got all working with this code:

PHP Code:
RegisterHam(Ham_Weapon_Reload"weapon_deagle""fwd_Weapon_Reload");

public 
fwd_Weapon_Reload(iEnt)
{
    
set_task(0"Message");
    return 
HAM_SUPERCEDE
}  

public 
Message(id)
{
    
client_print(idprint_center"You don't need to recharge.")

PD: For some strange reason (I think because of the iEnt index) client_print doesn't work, it needs the set_task function.

Quote:
Originally Posted by simanovich View Post
RTFM
Sorry, I didn't know how to search about this.
mlar98 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 00:39.


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