Raised This Month: $ Target: $400
 0% 

register_message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fvRate
Junior Member
Join Date: May 2018
Old 05-06-2018 , 07:47   Re: register_message
Reply With Quote #1

Even if it accepts an index parameter, you are not really using it, if you need some specific operation (condition for it to run), for example if player is X then set_msg_arg_int( playerIndex, ARG_BYTE, iFov ); then just use get_players for that.
fvRate is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 05-06-2018 , 15:38   Re: register_message
Reply With Quote #2

Quote:
Originally Posted by fvRate View Post
Even if it accepts an index parameter, you are not really using it, if you need some specific operation (condition for it to run), for example if player is X then set_msg_arg_int( playerIndex, ARG_BYTE, iFov ); then just use get_players for that.
No.

public Message_SetFOV(MsgId, MsgDest, MsgEntity) { ... }

MsgEntity is the player index. But you don't use player index in set_msg_arg/get_msg_arg natives. The first param is the argument index from the message.

@OP, to add a condition so you can change fov for only one player use the MsgEntity param and do the check before doing set_msg_arg_int.
__________________

Last edited by HamletEagle; 05-06-2018 at 15:43.
HamletEagle 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 04:37.


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