^
اول كود عندك قوس زيآده
سويت لك مثال على الفنكشنات الي طلبتها انت
Client :
addEventHandler("onClientGUIClick",resourceRoot, function ( )
if ( source == Weapon ) then
triggerServerEvent("Weapon",localPlayer)
end
end)
Server :
addEvent("Weapon",true)
addEventHandler("Weapon",root, function (plr)
if ( isPedInVehicle(plr) ) then return end
if ( getPlayerMoney(plr) == 100 ) then
giveWeapon(plr,43,300)
takePlayerMoney(plr,100)
else
outputChatBox("..",plr,255,255,0,true)
end
end)