بالنسسبة لـ Armor + Health
اذا تبيه مفرق =
--ServerSide
addEvent("buyHealth", true)
addEventHandler("buyHealth", getRootElement(),
function()
if ( getPlayerMoney (source) >= 3000 ) then
takePlayerMoney(source, 3000 )
setElementHealth(source, 100)
outputChatBox("You Bought Health By : 3000$", source, 255, 255, 0, true)
local name = getPlayerName(source)
outputChatBox ( "#FFFF1A*** [ #FFFFFF" .. name .. " #FFFF1A] Has Bought Health By : 3000$ ***", getRootElement(), 255, 0, 0, true )
else
outputChatBox("You don't have 3000$ to buy Health", source, 255, 0, 0, true)
end
end )
----------------------------------------------- Armoor
addEvent("buyArmor", true)
addEventHandler("buyArmor", getRootElement(),
function()
if ( getPlayerMoney (source) >= 3000 ) then
takePlayerMoney(source, 3000)
setPedArmor(source, 100)
outputChatBox("You Bought Armor By : 3000$", source, 255, 255, 0, true)
local name = getPlayerName(source)
outputChatBox ( "#FFFF1A*** [ #FFFFFF" .. name .. " #FFFF1A] Has Bought Armor By : 3000$ ***", getRootElement(), 255, 0, 0, true )
else
outputChatBox("You don't have $3000 to buy Armor", source, 255, 0, 0, true)
end
end )
--ByAboShanab