Hooking event problem
Greetings, im having a bit of trouble "hooking" a triggerevent from an i_t_g entity from within TFC.
First of all, I did a test as you can see with the outcommented register_logevent, which calls the function "test", this works perfectly as expected. When I try to call the function "cmdCam" instead, I get a bunch of errors: PHP Code:
PHP Code:
|
Re: Hooking event problem
check if the player is valid?
|
Re: Hooking event problem
AFAIK logevent doesn't parse "id", it doesn't parse anything actually.
You need to get the log argument with read_logdata() or read_logargv(), then use parse_loguser() on it to get the player name and then use get_user_index() to get the player's entity index which you can use on that function. |
Re: Hooking event problem
Ok, seems a bit tedious, is there a better way that would accomplish the same as logevent?
|
Re: Hooking event problem
Also im a bit puzzled over that it infact works with, client_print, which effectively also need the ID?
|
Re: Hooking event problem
Ok, for anyone interested, this fixed it for me:
PHP Code:
PHP Code:
|
Re: Hooking event problem
Quote:
|
Re: Hooking event problem
Quote:
If there's a game event message that can be used with register_event/message() then you can use it that way but with logevent you need to parse stuff with that stock :P |
| All times are GMT -4. The time now is 19:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.