Problem solved
How would I go about giving a player a primary and secondary weapon, and only having one of each? I made a buy menu where you can select your primary and secondary weapon and it will set a “primary” and “secondary” Networked Int to correspond with the weapons in this table:
[lua]WeaponTable = {
[1] = {
[1] = {
name = “SMG”,
cost = 10,
entity = “cb_weapon_smg”
},
[2] = {
name = “Shotgun”,
cost = 20,
entity = “cb_weapon_shotgun”
}
},
[2] = {
[1] = {
name = “Pistol”,
cost = 5,
entity = “cb_weapon_pistol”
}
}
}[/lua]
Now I just don’t know how to make it so I can give and take the weapons from the player based on what they’ve selected. I want it to be similar to the CS:S weapon buying.
I hope I made sense.
EDIT:
screenshot of buy menu.
[img_thumb]https://dl.dropbox.com/u/3609329/buymenu.jpg[/img_thumb]
EDIT2:
meta.lua
buymenu.lua