AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ts_getuserwpn (https://forums.alliedmods.net/showthread.php?t=16843)

mysticssjgoku4 08-21-2005 09:36

ts_getuserwpn
 
Well. I was wondering, how do I get the GUNID as well?
It gives me this.

Code:
   // Get some of their current settings    new currclip, currammo, currmode, currextra;    ts_getuserwpn(id,currclip,currammo,currmode,currextra);    set_pdata_int(tsgun,tsweaponoffset[weapon],ammo); // set their ammo    // Grenade or knife, set clip    if(weapon == 24 || weapon == 25 || weapon == 35) {      set_pdata_int(tsgun,41,ammo); // special clip storage      set_pdata_int(tsgun,839,ammo); // more special clip storage      currclip = ammo; // change what we send to WeaponInfo      ammo = 0; // once again, change what we send to WeaponInfo    }    else { // Not a grenade or knife, set ammo      set_pdata_int(tsgun,850,ammo); // special ammo storage    }

I mean I got it to give me the clip, ammo, mode, extras. IT works fine, but how do I get it to give me the gunid, seperately? Thanks.

Twilight Suzuka 08-21-2005 13:29

The native returns the gun id.

mysticssjgoku4 08-21-2005 14:13

Quote:

Originally Posted by Twilight Suzuka
The native returns the gun id.

In English please?

DahVid 08-21-2005 14:28

The number of the gun, glock 18 is 1... ETC.
If you need the numbers use google or some shit. Otherswise open up ts_fgd.fgd and look around.

mysticssjgoku4 08-21-2005 14:40

Quote:

Originally Posted by DahVid
The number of the gun, glock 18 is 1... ETC.
If you need the numbers use google or some shit. Otherswise open up ts_fgd.fgd and look around.

You obviously do not get what I am trying to do here. I'm trying to get the gunid of the weapon the player is holding.

XxAvalanchexX 08-21-2005 15:12

ts_getuserwpn (the native) is equal to (as in returns) the gun they are holding.

Code:
new currweapon = ts_getuserwpn(...);

mysticssjgoku4 08-21-2005 15:17

Quote:

Originally Posted by XxAvalanchexX
ts_getuserwpn (the native) is equal to (as in returns) the gun they are holding.

Code:
new currweapon = ts_getuserwpn(...);

Thank you VERY MUCH! :D

Twilight Suzuka 08-22-2005 04:51

I said that already....

mysticssjgoku4 08-22-2005 08:49

Quote:

Originally Posted by Twilight Suzuka
I said that already....

I know, but I didn't quite understand what you meant, I'm kind of new, Now I have learned what a native is :). Thank You.


All times are GMT -4. The time now is 14:34.

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