Raised This Month: $ Target: $400
 0% 

Set User Ammo - The Specialists


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Minimum
Senior Member
Join Date: Jun 2006
Old 11-08-2006 , 18:56   Set User Ammo - The Specialists
Reply With Quote #1

Alright, I found this function in the tsxaddon include called ts_giveuserammo. But it wants a weaponid. Of course ts_getuserwpn has no weaponid return on it. I even tried to do weaponid = ts_getuserwpn(id,clip,ammo,mode,extra) and then use that weaponid. No luck. Is there any method on how to bypass this or make it at least work?
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
wonsae
Senior Member
Join Date: Jan 2006
Location: Behind you >:D
Old 11-08-2006 , 19:36   Re: Set User Ammo - The Specialists
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=46939 that should help
+karma me XD
wonsae is offline
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 11-08-2006 , 20:05   Re: Set User Ammo - The Specialists
Reply With Quote #3

[offtopic]
You know longer desire the dark powers of -karma?
[/offtopic]
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
Minimum
Senior Member
Join Date: Jun 2006
Old 11-08-2006 , 21:13   Re: Set User Ammo - The Specialists
Reply With Quote #4

Thanks, but it still won't set the ammo or clip to full. Here is all of the code in the plugin. And don't mind the commented out arg and dual client_prints. They're for when I make so you can set people to have inf ammo. That will be after I am sure the main part is done and flawless.

<Removed Due To Friend's Request>

Last edited by Minimum; 11-09-2006 at 00:10.
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-08-2006 , 22:12   Re: Set User Ammo - The Specialists
Reply With Quote #5

ts_get_user_tsgun doesn't get their current weapon, it gets the entity index of their special entity created to hold all of their weapon information. Use this instead:

Code:
new dummy, weaponid = ts_getuserwpn(playerid,dummy,dummy,dummy,dummy);
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Minimum
Senior Member
Join Date: Jun 2006
Old 11-09-2006 , 01:11   Re: Set User Ammo - The Specialists
Reply With Quote #6

Works like a charm, thanks.
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
stupok
Veteran Member
Join Date: Feb 2006
Old 11-09-2006 , 02:43   Re: Set User Ammo - The Specialists
Reply With Quote #7

Minimum which server are you working on? I remember reading in these forums that you belong to one of the zombie servers on TS.
stupok is offline
Minimum
Senior Member
Join Date: Jun 2006
Old 11-09-2006 , 13:20   Re: Set User Ammo - The Specialists
Reply With Quote #8

Gabion Studios Undead Zone. Currently working on my own zombie rpg plugin which is at 0.1.3 RC 1. Ip is 68.5.27.233:27016.
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:57.


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