AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   [Native]Sync HUD Messages (https://forums.alliedmods.net/showthread.php?t=100499)

Alka 08-15-2009 05:36

[Native]Sync HUD Messages
 
2 Attachment(s)
Sync HUD Messages

  • This API was intended to work with alot of messages and 1 channel and save the others. If you want to show like 3 messages in channel 1, just call the native SyncHudMessage() 3 times for channel 1 with what params you want. Also support individual params for each message.
  • The messages will be showed in order, after the last one showed is gone.
  • So if you have 3 plugins that show hud messages on same channel and all use SyncHudMessage, messages will be showed in order, will not overwrite.

Maybe this isn't the best way,but as i can see worked fine until now.

Native: SyncHudMessage(id, red, green, blue, Float: x, Float:y, effects, Float:fxtime, Float:holdtime, Float:fadeintime, Float:fadeouttime, channel, text[], any:...)

Feel free to report any possible bugs/optimizations.


crazyeffect 08-15-2009 06:07

Re: Sync HUD Messages
 
Cool :D

Arkshine 08-15-2009 06:10

Re: Sync HUD Messages
 
Nice. I will probably use it for a plugin. ( Damn I've totally forgot to test it when you have asked me.. :mrgreen: )

ConnorMcLeod 08-15-2009 07:13

Re: Sync HUD Messages
 
You could enable the second color and alpha (for both colors), you would need to send SVC_TEMPENTITY instead of show_hudmessage then, but would be awesome.

jim_yang 08-15-2009 07:24

Re: Sync HUD Messages
 
that lead too much params to pass, better to control params less than 7

Alka 08-15-2009 07:47

Re: Sync HUD Messages
 
@Arkshine - Np, it was a minor fix.
@Connor - Like jim said, too much params...but ofc will be nice.

Alucard^ 08-15-2009 11:07

Re: Sync HUD Messages
 
Wow, good job alka...

But i dont understand at all how to use it, cuz i thinked that the plugin is an example but no... so, if i want to use it on a plugin, i have to use the include and your plugin enabled?

Thx, and sry for my english.

Alka 08-15-2009 17:03

Re: Sync HUD Messages
 
It's a native, install the plugin attached on your server, then use the native showed above in any plugin you want :-D

Alucard^ 08-15-2009 19:07

Re: [Native]Sync HUD Messages
 
Ok, thx to much and... other question... a plugin that use this native (that requires your plugin and the .inc) can be approved? Or is only for a "personal purpose"?

Alka 08-15-2009 19:26

Re: [Native]Sync HUD Messages
 
Of course it can be approved. I released this so that people can use it...


All times are GMT -4. The time now is 18:27.

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