PDA

View Full Version : int playerammo


Ebola
July 17th, 2004, 03:10 PM
int playerammo(int plnum, int ammonum, {int amount})

I don't seem to quite understand how this one works.. it's explained in the FSfuncs but I don't understand most of those explanations..

Maybe I should hire a professional tutor ;)

jnsg
July 17th, 2004, 03:33 PM
Well, plnum is the number of the player whose ammo you are dealing with, ammonum is a number representing the ammo type (I don't know what they are though), and if you include amount, it will set that player's ammo to amount. I think. It returns the amount of that ammo type that the player has.

iori
July 18th, 2004, 12:29 AM
for example:

playerammo(playerobj(0), weapon number, amount);


-playerobj():
0, 1, 2, and 3 being for players 1, 2,3 and 4.

-weapon number goes like this:
see Frades' post, mine was horribly wrong.

-Amount: Amount of ammo, heh.

playerweapon and playerammo supposedly be used to return the weapon and/or ammo as well, not just set it.

Frades
July 18th, 2004, 12:35 AM
They are not.
If i remember correctly, those were messed up in some weird way.
For example 0 is in fact pistol/chaingun ammo.. or something like that.
At least i think that's the way it is.. but this is a minor problem, since it's not too hard to try them all unti..
Oh well, i'll open up thwq and look.

Edit:
0 - bullets
1 - shells
2 - cells
3 - rockets

script 7 // player ammo
{
playerammo(2, 0, 12);
}
startscript(7);
So this would give 12 bullets to player 3.

Ebola
July 28th, 2004, 10:53 AM
So. is there something equal for all the settings for the player Like weather he got a berserk or not or how much health he got etc?

Cherepoc
July 28th, 2004, 11:00 AM
objhealth - how much healh has object.