replacement weapons

I need to spend a replacement weapon when a player picks it up with weapon_NAME to weapone_NAME1.
How to do it?

Why? What are you trying to do?

Surely it should be possible for you to simply rename NAME1 weapon to NAME?

You got me wrong. I need to take away their arms and give him another.

so change the model?

[editline]13th March 2015[/editline]

or when player picks up weapon_NAME hes given weapon_NAME1

I think I understand what you need :v:

or

and

I do not understand how to determine whether he had a weapon

[lua]
concommand.Add(“weapon”, function( ply )
if ply:GetActiveWeapon(“weapon_weapon1”):GetClass() then
ply:StripWeapons(“weapon_weapon1”)
ply:Give(“weapon_weapon2”)
end
end)[/lua]

[ERROR] lua/autorun/client/weapon.lua:3: attempt to call method ‘StripWeapons’ (a nil value)

  1. unknown - lua/autorun/client/weapon.lua:3
  2. unknown - lua/includes/modules/concommand.lua:54

That function can only be ran on the server. It appears you’re trying to run it on the client.

This.

And to run serverside code on a client you must use networking. Its on the wiki if you need it.