AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Set User Ammo - The Specialists (https://forums.alliedmods.net/showthread.php?t=47059)

Minimum 11-08-2006 18:56

Set User Ammo - The Specialists
 
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?

wonsae 11-08-2006 19:36

Re: Set User Ammo - The Specialists
 
http://forums.alliedmods.net/showthread.php?t=46939 that should help
+karma me XD

Lord_Destros 11-08-2006 20:05

Re: Set User Ammo - The Specialists
 
[offtopic]
You know longer desire the dark powers of -karma?
[/offtopic]

Minimum 11-08-2006 21:13

Re: Set User Ammo - The Specialists
 
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>

XxAvalanchexX 11-08-2006 22:12

Re: Set User Ammo - The Specialists
 
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);

Minimum 11-09-2006 01:11

Re: Set User Ammo - The Specialists
 
Works like a charm, thanks.

stupok 11-09-2006 02:43

Re: Set User Ammo - The Specialists
 
Minimum which server are you working on? I remember reading in these forums that you belong to one of the zombie servers on TS.

Minimum 11-09-2006 13:20

Re: Set User Ammo - The Specialists
 
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.


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

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