Can someone do that?
Scripts
Only CT Buy Weapons Script
Only CT Buy Weapons Script
1

addhook("buy","by")
function by(id,wp)
te = player(id,"team")
if te == 1 then
return 1
else
return 0
end
end
5unuy: Improved it a bit:
2nd parameter is unused so you can omit it
There's no need to do the te = player(id,"team") and then if te == 1 then when you can just if player(id,"team") == 1, it saves a global variable
No need to explicitly return 0 in this case
Indent your code - it makes it easier to seeaddhook("buy","by")
function by(id)
	if player(id,"team") == 1 then
		return 1
	end
end
addhook("buy","OnBuy")
function OnBuy(id)
if player(id,'team') == 1 then
msg2(id,'Error: terrorist shop blocked!')
end
return 1
end
addhook("buy","OnBuy")
function OnBuy(id)
if player(id,'team') == 1 then
msg2(id,'Error: terrorist shop blocked!')
end
return 1
end
Talented Doge is right. But you can prevent that by just moving the return 1 a little bit upper, I mean above the end.
1
