HP Icon Status

Started by FLR
10/07/2008 01:52
Page 1 of 1
FLR10/07/2008 01:52(edited 07/11/2008 23:12)

This plugin is SAFE for demo recording. -SchlumPF

!DOWNLOAD LINKS UPDATED (0.9 r1 only)!

Hi all geeks out there :D
Well, recently I started with some amxx coding. I don't say I'm pro, because I'm certainly not. There's certainly many things that can be made more easily or in a better way. But anyways, I'll give you my second plugin.

When I wrote this I had HnS in mind.
I thought it would be cool with a notifier that tells you in a rough way what your hp state is. So, when your hp is below or equal to a specific value, then the color of the icon changes and if the hp is lower than a specific value, a sound will tell you the state of your hp.

Its mostly just for fun, I don't really see something useful in this plugin.

Name: Icon Status
Version: Version: 0.9 r1
Author: me ;)

cvars:
amx_ico_active 1|0 activates/deactivates plugin
amx_ico_statusicon sets the icon (default: d_knife)
amx_ico_soundinterval the interval between warnings

note: for the active, soundinterval etc you have to either restart in console or change map.


So, I've fixed the things schlumpf told me about, got rid of some global variables and cleaned up a lil bit.

Any suggestions or bugs? PM or email.


Links:(Updated)
Fuskbugg
Sendspace

SchlumPF10/07/2008 10:57(edited 10/07/2008 11:23)

code looks good so far but there are a few things which should be changed but no serious problem.

go on making short plugins :) some smaller things which should be done in a other way but i did the same things when i learned pawn :) anyway the code looks clean and a working plugin is always a nice plugin for ppl who try to get in amxx. in maybe one year you will look at old source codes from your plugin and just think "crap" cause you know a much better way ^^

http://schlumpf.ampaste.net/m4eca20f8 <- feedback, commented the things which should be cahnged but forgot
new Float:szDelay; is not a string (sz) its a float -> fDelay

ps: you will always need to include the source code since amxx is a gpl software which means you need to release your plugins under gpl terms too = everythings public. but if you keep your plugins private without any public dl link you are allowed to just give out the amxx to friends etc via icq, rapidshare etc

Acidas10/07/2008 11:14

Verry nice!! :) gj

FLR10/07/2008 11:40(edited 11/07/2008 04:38)

aah ok. Thx schlumpf. Well, I must say I just changed all the var names in a hurry. had to go somewhere and didnt have time to really think. and then, lazy as i am, i didnt have the "strength" to change em :P

Well, to be honest, im not that new to coding etc, just new to pawn.

I will look trough your comments and such.

And I know what you mean, when you say that when I look back etc, Ill think crap, did I really write this? I know whats that like :) Youve seen the very first map I got compiled? Hope not, because its really bad and ugly :P

Well thx so far.

SchlumPF10/07/2008 12:09(edited 10/07/2008 12:09)

then you are the guy who was asking some stuff at alliedmodders ( http://forums.alliedmods.net/showthread.php?t=73889 )
if yes nice insulting at the end :)

FLR10/07/2008 12:18(edited 10/07/2008 13:33)

nope, thats not me :P
My nick on alliedmodders is exactly as here on XJ, FLR.

Haha, but it was sure fun reading it :D
You can clearly see whos the "sucker" and whos not

SchlumPF10/07/2008 19:04

more feedback :)
http://schlumpf.ampaste.net/m618248dc

SchlumPF15/07/2008 23:50

[blockquote]//register_event("Damage", "eventDamage", "be", "2!0"); //wasnt accurate enough[/blockquote]
you can try to hook Ham_TakeDamage with the hamsandwich module. you can find some information in the ham includes.

FLR18/07/2008 15:45

Hmm, okay ;) I'll do that when I have some sparetime.

Alucard^07/11/2008 06:12

link dont work, can u reupload?

thx

FLR07/11/2008 23:17

Links updated.

Page 1 of 1

Please log in to post replies.