AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   How to use entity state inside AddToFullPack? (https://forums.alliedmods.net/showthread.php?t=330693)

redivcram 02-16-2021 11:53

How to use entity state inside AddToFullPack?
 
I am trying to set an entity visible to certain players. Upon creation of the entity, I set its rendermode to kRenderTransTexture and amount to 0, making them invisible globally, and it works.
Now, in AddToFullPack, I am exchanging information with certain clients and want to set the render properties to visible for them only.
I am not allowed to access any property as it gives me an error "Pointer to incomplete class type is not allowed". What's the deal here? I don't want to make the entity visible globally, just for certain players.

Code:

int AddToFullPack(struct entity_state_s* state, int e, edict_t* ent, edict_t* host, int hostflags, int player, unsigned char* pSet) {

    // Check for specified entity
    // Check if player is valid and meets conditions to make entity visible for.

    // If requirements are met, change the entity's rendermode and amount...
    state->rendermode = kRenderTransTexture;
    state->renderamt = 255;

    // ^
    // Those two lines are giving me the error. What am I to do with state?

    return 1;
}


redivcram 02-17-2021 11:23

Re: How to use entity state inside AddToFullPack_Post?
 
Update: I've learned that _Post does not have anything to do with my question. Using the regular AddToFullPack does nothing either. Same results.


All times are GMT -4. The time now is 12:03.

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