Client Sided
function bWep()
if source == wPistol then
outputChatBox("You purchased a Pistol for $250.", 255, 255, 0)
takePlayerMoney(250)
triggerServerEvent("bPistol", localPlayer)
end
end
addEventHandler("onClientGUIClick", getRootElement(), bWep)
Server Sided
function bPistol ( )
giveWeapon ( source, 22, 1 )
end
addEvent("bPistol", true)
addEventHandler("bPistol", root, bPistol)
And always remember: