Raised This Month: $ Target: $400
 0% 

Need Help with Menu and get_user_ammo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Silencer123
Veteran Member
Join Date: Jul 2006
Old 07-16-2006 , 10:40   Re: Need Help with Menu and get_user_ammo
Reply With Quote #1

I actually asked if \R works in the way I posted it:
1. 357 Ammo\R123$^n2. Sniper Ammo\R321$^n
and so on

and if i write:
Code:
new 357_clips, 357_rnds
get_user_ammo(id, 3, 357_clips, 357_rnds)
IT says this:
error 020: invalid symbol name ""
error 029: invalid expression, assumed zero
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
and those all go for the first line in mentioned code

EDIT: Fixed the kind of senceless bug: symbol must not start with a number -.-
changed 357_clips to a357_clips and 357_rnds to a357_rnds

EDIT: get_user_ammo(id, 3, a357_clips, a357_rnds)
does a357_rnds include the ammo in the current clip?
weapon_357 has 6 rounds per clip and you can carry 6 clips with the clip
in the weapon. so if my hud says (6|36), will a357_rnds be 36, or 42 (6 + 36)?
__________________
EAT YOUR VEGGIES

Last edited by Silencer123; 07-16-2006 at 15:29.
Silencer123 is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 07-16-2006 , 15:50   Re: Need Help with Menu and get_user_ammo
Reply With Quote #2

Quote:
how can I know what weapon has the ID "3"?
Here is an example:
Code:
new wid = 3 new weapon[32] get_weaponname(wid, weapon, 31) server_print("WeaponID is ^"%d^", WeaponName is ^"%s^"", wid, weapon)


Quote:
so i have
1. 357 Ammo\R123$^n2. Sniper Ammo\R321$^n
and so on?
Yes.

Quote:
does a357_rnds include the ammo in the current clip?
No.

Quote:
will a357_rnds be 36
Yes, it should be 36.

Last edited by VEN; 07-16-2006 at 15:53.
VEN is offline
Silencer123
Veteran Member
Join Date: Jul 2006
Old 07-16-2006 , 18:03   Re: Need Help with Menu and get_user_ammo
Reply With Quote #3

Thanks! I built a little script and got all IDs!
For who ever else needs this:


SC Sven Coop Sven Cooperative Weapon Constants Weapons Constants ID IDs
(Some similar repeating so you can find this with search)

WeaponID is 1, WeaponName is weapon_crowbar
WeaponID is 2, WeaponName is weapon_9mmhandgun
WeaponID is 3, WeaponName is weapon_357
WeaponID is 4, WeaponName is weapon_9mmAR
WeaponID is 5, WeaponName is
WeaponID is 6, WeaponName is weapon_crossbow
WeaponID is 7, WeaponName is weapon_shotgun
WeaponID is 8, WeaponName is weapon_rpg
WeaponID is 9, WeaponName is weapon_gauss
WeaponID is 10, WeaponName is weapon_egon
WeaponID is 11, WeaponName is weapon_hornetgun
WeaponID is 12, WeaponName is weapon_handgrenade
WeaponID is 13, WeaponName is weapon_tripmine
WeaponID is 14, WeaponName is weapon_satchel
WeaponID is 15, WeaponName is weapon_snark
WeaponID is 16, WeaponName is weapon_uziakimbo
WeaponID is 17, WeaponName is weapon_uzi
WeaponID is 18, WeaponName is weapon_medkit
WeaponID is 19, WeaponName is
WeaponID is 20, WeaponName is weapon_pipewrench
WeaponID is 21, WeaponName is weapon_minigun
WeaponID is 22, WeaponName is weapon_grapple
WeaponID is 23, WeaponName is weapon_sniperrifle
WeaponID is 24, WeaponName is
WeaponID is 25, WeaponName is
WeaponID is 26, WeaponName is
WeaponID is 27, WeaponName is
WeaponID is 28, WeaponName is
WeaponID is 29, WeaponName is
WeaponID is 30, WeaponName is

An ID where no weapon is shown does not have a weapon assigned (Do not use these IDs)


One Problem remains:
\R does not work. In the Menu I can read \R, it does not TAB or something.
Sven Cooperatives fault? Any other way?


EDIT: One weapon uses two ammo types, how can i get the amount of the second ammo type? (ammo_ARgrenades)
I tried to use ID 5 as a weapon ID, because it is right after weapon_9mmAR, but it is the same.


and a 3rd problem! client_spawn does not work:


Code:
 
public client_spawn(id)
{
 player_kits[id] = g_kits
 client_print(id,print_chat,"[SC STUFF PLUGIN] You spawned with %i Healthkits in your Backpack!",g_kits)
 return PLUGIN_HANDLED
}
EDIT: Just seeing that client_spawn is for ns
but what to use then?
__________________
EAT YOUR VEGGIES

Last edited by Silencer123; 07-17-2006 at 18:16.
Silencer123 is offline
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 08:04.


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