Both methods will yield the same values, and it should work for all clients. I've never seen it always show for client 1, anyways, you'd have to left shift 0 in to get it? Anyways, its good that it works, either way. Geit, you should fix your old plugin, mabye by just making one anno per viewer. Though, I was never able to get the hide annotation event to work, I had to just use the show for long time, show on self for short time method.
2 pow 1 = 2
2 pow 2 = 4
2 pow 3 = 8
1 lsh 1 = 2
1 lsh 2 = 4
1 lsh 3 = 8
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
Both methods will yield the same values, and it should work for all clients. I've never seen it always show for client 1, anyways, you'd have to left shift 0 in to get it? Anyways, its good that it works, either way. Geit, you should fix your old plugin, mabye by just making one anno per viewer. Though, I was never able to get the hide annotation event to work, I had to just use the show for long time, show on self for short time method.
2 pow 1 = 2
2 pow 2 = 4
2 pow 3 = 8
1 lsh 1 = 2
1 lsh 2 = 4
1 lsh 3 = 8
I'm working on it now - actually got most of it working, I just need to fix some things and bring it up to feature parity with the current version. Currently I've managed:
Fixed annotations repeatedly flying in
Fixed console spam
Fixed "Annotation too close" when annotation has expired
And yeah, the only way to do that is with an annotation per player so I'm currently doing
An update to this. Got it working with a command to enable it....but it's still wonky as fuck.
- I don't know how to save the info for each annotation so that it can be recalled on spawn, aside from using an SQL database to log these things (which I'm a noob at) or with Clientprefs (which I have no fucking idea about).
- When you get within range of someone with a tag enabled, the tag appears stuck to the left side of your screen. It should be visible parented to the head of the person who added it. I've been up and down the code and can't figure out why it's doing this.
- A continuation of #2, the visibility convar doesn't seem to be taking effect anymore as I've got several annotations stuck to my screen on the left side after letting people on my server play around with it. Even after noclipping way out into the void they were still stuck there.
- Here's the weird bit. In thirdperson, they appear perfectly above your own head, but when viewing someone else's, they apparently spawn at 0, 0, 0 (one of my admins said they spawn "in the skybox" so I'm assuming because my map doesn't have a 3D skybox, they are spawning at 0, 0, 0 for some reason)
new String:g_AnnotationText[MAX_ANNOTATION_COUNT][MAX_ANNOTATION_LENGTH]; new Float:g_AnnotationPosition[MAX_ANNOTATION_COUNT][3]; new bool:g_AnnotationCanBeSeenByClient[MAX_ANNOTATION_COUNT][MAXPLAYERS+1]; new bool:g_AnnotationEnabled[MAX_ANNOTATION_COUNT]; new bool:g_HasAnnotation[MAXPLAYERS+1];
new g_ViewDistance;
new Handle:g_hCVarViewDist;
public OnPluginStart() { HookEvent("player_spawn", Event_PlayerChanged); HookEvent("player_death", Event_PlayerDeath);
RegConsoleCmd("sm_tagme", Command_Annotate);
g_hCVarViewDist = CreateConVar("sm_annotate_view_dist", "50", "Sets the maximum distance at which annotations will be sent to players", _, true, 50.0);
Credit obviously to Geit for his Annotations plugin giving me somewhere to start. It's a better place to start from than the original snippet I posted in the main post.
Last edited by 404UserNotFound; 10-26-2015 at 20:53.