تفضل جرب :
addEvent ( "lol", true )
addEventHandler ( "lol", root,
function ( )
local money = getPlayerMoney (source)
if money >= 20000 then
takePlayerMoney ( source, 20000 )
outputChatBox ( "لقد إشتريت تذكرة الدخول لألعاب الدراجات النارية",source, 0,255,0, true )
setElementData ( source, "data", true )
else
outputChatBox ( "You dont have money.", source, 255, 0, 0, true )
end
end
)
addEventHandler ( "onMarkerHit", m1,
function (hitElement)
if getElementType (hitElement) == "player" and getElementData ( hitElement, "data" ) then
setElementPosition ( hitElement, 2792, -1721, 12.8 )
else
outputChatBox ( "لم يتم وجود داتا معك.", hitElement, 255, 255, 255, true )
end
end
)