السلام عليكم
local marker1 = createMarker(207.19234,1920.68762,16.64063, 'cylinder',2,143, 155, 154)
function markerHiteko1(playerTeam1)
if getElementType(playerTeam1) == "player" then
if getPlayerTeam(playerTeam1) and getTeamName(getPlayerTeam(playerTeam1)) == "Team" then
if getPlayerMoney ( playerTeam1 ) then
takePlayerMoney ( playerTeam1, 40000 )
setElementDimension (playerTeam1, 2 )
setElementPosition (playerTeam1, 202.87492,1896.65649,17.64063 )
outputChatBox ( "تم نقلك الى العالم الوهمي", playerTeam1,0,255,0 )
else
outputChatBox ( "انت لست بالتيم" ,playerTeam1,255,0,0 )
end
end
end
end
addEventHandler( "onMarkerHit", marker1,markerHiteko1)
الكود عند لمس الماركر يتحقق من اسم التيم لو موجود ينقله ويخصم منه فلوس وينقله لعالم وهمي
لكن المشكله انه لما تكون الفلوس 0 تصير بالسالب ابي يقوله لا تملك المال ما ابيها تصير سالب
ابي الكود فقط الي ما يخليه سالب
وما ابي احد يعطيني جاهز مشان اعرف خطأي