I want a button, then the player press it, and buy a grenade, ( loses 400$, and get the grenade equiped)
I never made a lua script before, whats wrong whit that one?
---------------------------------------------------------------------------
addhook("use","weaponshop")
function weaponshop(id,trigger)
if trigger=="HE" then
if (player(id,"money")>399 then
parse("setmoney"..id.." "..player(id,"money")-400)
parse("equip"..id.." "..player(id,"51")")
end
end
end