Raised This Month: $ Target: $400
 0% 

[Help] Amxx plugin to amxx module conversion error.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 12-22-2013 , 02:54   [Help] Amxx plugin to amxx module conversion error.
Reply With Quote #1

Hi, i tried to convert this amxx plugin into amxx module, but it seem not working on server. All players still can see the EF_DIMLIGHT. Well this plugin is to render flashlight only for owner.

Amxx plugin


Amxx module
yokomo is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 12-22-2013 , 05:21   Re: [Help] Amxx plugin to amxx module conversion error.
Reply With Quote #2

PHP Code:
int FN_AddToFullPack_Post(struct entity_state_s *stateint eedict_t *entedict_t *hostint hostflagsint playerunsigned char *pSet

    if (
player && ent!= host && META_RESULT_ORIG_RET(int) && state->effects EF_DIMLIGHT 
        
state->effects state->effects & ~EF_DIMLIGHT;

    
RETURN_META_VALUE(MRES_IGNORED0);

__________________

Last edited by Bos93; 12-22-2013 at 05:43.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-22-2013 , 05:33   Re: [Help] Amxx plugin to amxx module conversion error.
Reply With Quote #3

In pawn, e and ent are integers, host in integer

In c++, ent is edict, so use 'e' instead

->

e != host
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Old 12-22-2013, 05:41
Bos93
This message has been deleted by Bos93.
Bos93
Veteran Member
Join Date: Jul 2010
Old 12-22-2013 , 05:45   Re: [Help] Amxx plugin to amxx module conversion error.
Reply With Quote #4

Quote:
Originally Posted by ConnorMcLeod View Post
In pawn, e and ent are integers, host in integer

In c++, ent is edict, so use 'e' instead

->

e != host
host is edict ( edict_t *host )

so e!= host is not correct ( e = int , host = edict )
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 12-22-2013 , 11:22   Re: [Help] Amxx plugin to amxx module conversion error.
Reply With Quote #5

This 1 work fine in server:
PHP Code:
int FN_AddToFullPack_Post(struct entity_state_s *esint eedict_t *entedict_t *idint hostflagsint playerunsigned char *pSet)
{
    if (
player && (ENTINDEX(ent) != ENTINDEX(id)) && (es->effects EF_DIMLIGHT)) es->effects es->effects & ~EF_DIMLIGHT;

    
RETURN_META_VALUE(MRES_IGNORED1);

yokomo is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 12-22-2013 , 11:51   Re: [Help] Amxx plugin to amxx module conversion error.
Reply With Quote #6

ENTINDEX(ent) != ENTINDEX(id) no need convert to int, just ent != id
__________________

Last edited by Bos93; 12-22-2013 at 11:51.
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
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 12:10.


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