Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have to re-buy guns in order to use them again #279

Open
ThatRandomGuy908 opened this issue Jan 17, 2018 · 5 comments
Open

Have to re-buy guns in order to use them again #279

ThatRandomGuy908 opened this issue Jan 17, 2018 · 5 comments

Comments

@ThatRandomGuy908
Copy link

ThatRandomGuy908 commented Jan 17, 2018

So I have CS:S weapons in the pointshop for donators to buy whenever they want. The Issue is whenever the round ends the weapons don't respawn with them. They have to sell it and rebuy it to re-equip it. Is there any.

The Gamemode is TTT (terrortown)

@damiankil1999
Copy link
Contributor

damiankil1999 commented Jan 20, 2018

in the item's lua file add the folowing line or set it to false if it is already in the file.
ITEM.SingleUse = false

This property can be found on the website http://pointshop.burt0n.net/items/properties#single-use

@ThatRandomGuy908
Copy link
Author

ThatRandomGuy908 commented Jan 21, 2018 via email

@damiankil1999
Copy link
Contributor

damiankil1999 commented Jan 21, 2018

Ah, found it
You need to give the weapon to the player when he spawns, you also need the ITEM.SingleUse = false
This is the function you need to add to all your Pointshop weapons.

function ITEM:PlayerSpawn(ply, modifications)
        ply:Give(self.WeaponClass)
	ply:SelectWeapon(self.WeaponClass)
end

@ThatRandomGuy908
Copy link
Author

@damiankil1999 The weapons are now with the player whenever they respawn! But players still have to sell and rebuy a weapon in order to reequip it. Is there a way to fix that?

@Oyplap
Copy link

Oyplap commented May 10, 2020

Its:

function ITEM:OnPlayerSpawn(ply, modifications)
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponClass)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants