VS Limbshot
I made a plugin for the Vampire Slayer mod but it has a nasty bug in it. The idea is that vampires should always kill the slayer and not slap them to 5 hp if you hit them on a limb. This is my code:
Code:
#include <amxmodx>Any reply that will improve the plugin or help me understand small and amxx better will be very appreciated :D |
Re: VS Limbshot
I'm new at this too...but maybe switch the calls of your funtions..
Code:
user_silentkill(victim) Code:
set_user_frags(attacker, get_user_frags(attacker)+1)hope that helps... greetz regalis |
Re: VS Limbshot
Nope, that doesnt help.
I tried changing the PLUGIN_CONTINUE to PLUGIN_HANDLED also, but without result :| I tried to compile it with the web compiler on the amxx site and i got this error: /home/groups/amxmodx/tmp3/textC6HWob.sma(71) : error 035: argument type mismatch (argument 1) I dont get any warnings or errors on the compiler that was with the amxx installation :? |
Re: VS Limbshot
i tried it too in webcompiler and local...local without error and in webcompiler with the same error...
In the documentation is the same "stock DeathMessage" like yours...strange! Sorry i can't find the bug.. |
Re: VS Limbshot
Thanks for looking at it anyway :wink:
Anyone else got some ideas? I dont know if the webcompiler error has something to do with it cuz the one compiled on the local compiler works just fine, only stats are messed up as long as the slayer doesnt get killed a second time... |
Re: VS Limbshot
Using set_user_frags only changes the player's frags internally. This means that the actual value is changed, but what is displayed on the scoreboard is not. You will need to figure out how VS's ScoreInfo message works, and send out one of those with the new information for it to appear right away.
I've also noticed some odd behaviour with user_silentkill that was giving players the appearance of -1 frags on the scoreboard until the game refreshed it (ie: the player kills someone or dies). |
Re: VS Limbshot
i changed the code to this:
PHP Code:
Are you saying that i have to hook the ScoreInfo message and create my own, like i did with the DeathMsg? Or is there a way to only refresh the frags? Im trying to figure out the ScoreInfo with the register_message command but i have no idea if that is the right way or if that even works... |
Re: VS Limbshot
I don't know if you need this but with that plugin you can log all (i think all) messages into a log-file...
Maybe it is usefull for you!? http://forums.alliedmods.net/showthread.php?p=65983 greetz and thx regalis ;) |
Re: VS Limbshot
PHP Code:
If you should find anything that can be improved, no matter how small it is, plz say so. And should i post this in the plugins section? I dont get that approving thing, what does it need to be approved for? I only want that people who want to use it can find it easily... Anyway, thanks to avalanche and regalis for the usefull tips :up:. I learned a lot while making this plugin. |
| All times are GMT -4. The time now is 06:46. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.