AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   changing user ammo. update ammo displayed on hud? (https://forums.alliedmods.net/showthread.php?t=13863)

whatisruleone 05-31-2005 18:50

changing user ammo. update ammo displayed on hud?
 
In my plugin I have code that changes the amount of ammo that a user holds, however, the ammo displayed on the hud remains the same until the user reloads.

Is there a way to make the ammo displayed on the hud update?

v3x 05-31-2005 23:18

Pretty sure it's not.. :|

whatisruleone 06-01-2005 05:09

O well :(,thanks for replying


It is good apart from that. The split between people who think its a good idea is 50:50 as well

It is a plugin that connects the users ammo to the number of flag caps they have made. The way i acheived it is detecting the spawn event, then just after that, calculating how much, by the number of flags caps, and the score, then adjusting backpack ammo to suit.

It works great, except the ammo displayed on the HUD dosn't update until the user reloads, and there are currently to weapons it does not work for, British marksman rifle, and the scoped fg42.

Obviously there is issue with maps like charlie where the axis have no caps, but its not designed for maps like that, so it could be programmed to have no effect. The point is maps like avalanche. To leave campers who do no caps without much ammo, and encourage them to cap.


Not much point in continuing though, as majority admin vote decides if we use it and its 3:2 against.

Sodium 06-01-2005 05:37

Yeh if you made your own sprites with it (Copy the zeros and junk.. bleh)

whatisruleone 06-01-2005 06:38

huh :?:

whatisruleone 06-02-2005 08:34

I have been looking around, google can be a wonderful thing, only problem is i don't understand what i have found. even if it looks hopeful.


Would sending a message for AmmoX work?
if so how would i actully contruct the message.

I know it would use:
message_begin
write_byte
message_end

However I have only been playing with these plugins less than a month, and I don't understand how i would construct the message, or if I am barking up the wrong tree?

Edit: I have managed to get this to work for all weapons except, axis sniper, and all bazookas


All times are GMT -4. The time now is 16:37.

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