Waht is Problem
Server :
function khh (theplayer)
pool = getPlayerMoney(theplayer)
if pool >= 50 then
takePlayerMoney(theplayer,400)
vehshoti = createVehicle (411,72.373046875,-66.451171875,0.609375)
setVehicleColor(vehshoti,1,1,1)
outputChatBox("Info : Shoma Mashin Peugeot Pars Ra Daryaft Kardid.",theplayer,0,255,0)
warpPedIntoVehicle(theplayer,vehshoti)
else
outputChatBox("Info : Shoma Pol Nadarid",theplayer,255,0,0)
end
end
addEvent("barmavad",true)
addEventHandler("barmavad",root,khh)
function Kh(theplayer)
pool = getPlayerMoney(theplayer)
if pool >= 50 then
takePlayerMoney(theplayer,400)
vehshoti = createVehicle (411,72.373046875,-66.451171875,0.609375)
setVehicleColor(vehshoti,1,1,1)
outputChatBox("Info : Shoma Mashin Peugeot Pars Ra Daryaft Kardid.",theplayer,0,255,0)
warpPedIntoVehicle(theplayer,vehshoti)
else
outputChatBox("Info : Shoma Pol Nadarid",theplayer,255,0,0)
end
end
Client :
local screenW, screenH = guiGetScreenSize()
CardBackGround = guiCreateStaticImage((screenW - 1800) / 2, (screenH - 1000) / 2, 1700, 1000, "image.png", false)
CardPurchase1 = guiCreateStaticImage(1000, 251, 388, 113, "Group 1.png", false, CardBackGround)
CardPurchase2 = guiCreateStaticImage(1000, 400, 388, 113, "Group 2.png", false, CardBackGround)
CardPurchase3 = guiCreateStaticImage(1000, 560, 388, 113, "Group 3.png", false, CardBackGround)
CardClose = guiCreateStaticImage(1450, 100, 43, 45, "Group 4.png", false, CardBackGround)
guiSetVisible(CardBackGround, false)
addEventHandler("onClientGUIClick",root,
function ()
if source == CardPurchase1 then
triggerServerEvent("barmavad",LocalPlayer)
elseif source == CardPurchase2 then
triggerServerEvent("barmavadshoti",LocalPlayer)
--elseif source == CardPurchase then
-- triggerServerEvent("")
elseif source == CardClose then
guiSetVisible(CardBackGround, false)
showCursor(false)
end
end
)
m4 = createMarker(71.189453125,-85.0009765625,-0.5,"cylinder",1.5)
addEventHandler("onClientMarkerHit",m4,
function ()
guiSetVisible(CardBackGround, true)
showCursor(true)
end)
addEventHandler("onClientMarkerLeave",m4,
function ()
guiSetVisible(CardBackGround, false)
showCursor(false)
end)