WTF_ Posted September 10, 2017 Share Posted September 10, 2017 addEvent ( 'lol' , true ) addEventHandler ( 'lol' , root , function ( ) if getPlayerMoney ( source ) >= 20000 then takePlayerMoney ( source , 20000 ) outputChatBox ( "لقد إشتريت تذكرة الدخول لألعاب الدراجات النارية",localPlayer, 0,255,0 ) setElementData ( source , "tick" , "true" ) else outputChatBox ( "انت لا تملك المال الكافي !!!",localPlayer, 255,0,0 ) end end ) m1 = createMarker ( 2792.90430, -1721.76599, 12.8,"arrow", 2, 255, 255, 100 ) addEventHandler ( "onMarkerHit" , m1 , function ( hitElement ) local data = getElementData ( source, "tick" ) if data == "true" then setElementPosition (source , 2792, -1721, 12.8 ) else outputChatBox ( "انت لا تملك المال الكافي !!!",localPlayer, 255,0,0 ) end end ) ليش لما يتحقق الإيفنت lol وألمس الماركر m1 ما يسحبني للمكان الي أبيه بل بيضهر لي الكلام وحتى إن لم يتحقق الإيفنت lol بيضهر لي الكلام Link to comment
MR.StoRm Posted September 10, 2017 Share Posted September 10, 2017 (edited) addEvent ( 'lol' , true ) addEventHandler ( 'lol' , root , function ( ) if getPlayerMoney ( source ) >= 20000 then takePlayerMoney ( source , 20000 ) outputChatBox ( "لقد إشتريت تذكرة الدخول لألعاب الدراجات النارية",source, 0,255,0 ) setElementData ( source , "tick" , true ) else outputChatBox ( "انت لا تملك المال الكافي !!!",source, 255,0,0 ) end end ) m1 = createMarker ( 2792.90430, -1721.76599, 12.8,"arrow", 2, 255, 255, 100 ) addEventHandler ( "onMarkerHit" , m1 , function ( hitElement ) if ( getElementType ( hitElement ) == 'player' ) then if ( getElementData ( source , 'tick' ) == true ) then setElementPosition (source , 2792, -1721, 12.8 ) else outputChatBox ( "انت لا تملك المال الكافي !!!",source, 255,0,0 ) end end end ) جرب هذا , وتأكد أنه سيرفر :] Edited September 10, 2017 by MR.StoRm Link to comment
WTF_ Posted September 10, 2017 Author Share Posted September 10, 2017 3 minutes ago, MR.StoRm said: addEvent ( 'lol' , true ) addEventHandler ( 'lol' , root , function ( ) if getPlayerMoney ( source ) >= 20000 then takePlayerMoney ( source , 20000 ) outputChatBox ( "لقد إشتريت تذكرة الدخول لألعاب الدراجات النارية",source, 0,255,0 ) setElementData ( source , "tick" , true ) else outputChatBox ( "انت لا تملك المال الكافي !!!",source, 255,0,0 ) end end ) m1 = createMarker ( 2792.90430, -1721.76599, 12.8,"arrow", 2, 255, 255, 100 ) addEventHandler ( "onMarkerHit" , m1 , function ( hitElement ) if ( getElementData ( source , 'tick' ) == true ) then setElementPosition (source , 2792, -1721, 12.8 ) else outputChatBox ( "انت لا تملك المال الكافي !!!",source, 255,0,0 ) end end ) جرب هذا , وتأكد أنه سيرفر :] لا ما اشتغل Link to comment
MR.StoRm Posted September 10, 2017 Share Posted September 10, 2017 Just now, WTF_ said: لا ما اشتغل عدلت عليه جربه . Link to comment
WTF_ Posted September 10, 2017 Author Share Posted September 10, 2017 1 minute ago, MR.StoRm said: عدلت عليه جربه . لا كمان ما أشتغل أروح للماركر ما بيسوي شي لا يسحبني ولا يقول لي الكلام Link to comment
MR.StoRm Posted September 10, 2017 Share Posted September 10, 2017 Just now, WTF_ said: لا كمان ما أشتغل أروح للماركر ما بيسوي شي لا يسحبني ولا يقول لي الكلام متأكد انك حاطه سيرفر ؟ Link to comment
WTF_ Posted September 10, 2017 Author Share Posted September 10, 2017 Just now, MR.StoRm said: متأكد انك حاطه سيرفر ؟ يب متأكد حاطه في السيرفر Link to comment
MR.StoRm Posted September 10, 2017 Share Posted September 10, 2017 Just now, WTF_ said: يب متأكد حاطه في السيرفر ورني كلنت Link to comment
WTF_ Posted September 10, 2017 Author Share Posted September 10, 2017 GUIEditor = { label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() w1 = guiCreateWindow(158, 120, 422, 366, "Ticket System", false) guiWindowSetSizable(w1, false) guiSetAlpha(w1, 1.00) guiSetProperty(w1, "CaptionColour", "FFCE3094") b1 = guiCreateButton(116, 84, 204, 62, "شراء التذكرة", false, w1) guiSetFont(b1, "default-bold-small") guiSetProperty(b1, "NormalTextColour", "FFDB00FB") b2 = guiCreateButton(116, 174, 204, 62, "لا أريد", false, w1) guiSetFont(b2, "default-bold-small") guiSetProperty(b2, "NormalTextColour", "FF00F2FA") b3 = guiCreateButton(354, 322, 58, 34, "خروج", false, w1) guiSetFont(b3, "default-bold-small") guiSetProperty(b3, "NormalTextColour", "FFF90000") GUIEditor.label[1] = guiCreateLabel(76, 24, 288, 60, "تذكرة الدراجات : سعر التذكرة 20 الف ", false, w1) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 97, 58, 195) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") GUIEditor.label[2] = guiCreateLabel(10, 329, 110, 37, "", false, w1) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 64, 202, 50) GUIEditor.label[3] = guiCreateLabel(33, 235, 362, 87, "", false, w1) end ) addEventHandler("onClientResourceStart", root, function() guiSetVisible ( w1 , false ) end ) m1 = createMarker ( 2774.73999, -1704.48718, 10.84375,"cylinder", 1.5, 255, 50, 100 ) addEventHandler ( "onClientMarkerHit" , m1 , function ( ) guiSetVisible ( w1 , true ) showCursor ( true) end ) addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == b1 ) then triggerServerEvent ( "lol" , localPlayer ) guiSetVisible ( w1 , false ) showCursor ( false ) elseif ( source == b3 ) then guiSetVisible ( w1 , false ) showCursor ( false ) elseif ( source == b2 ) then guiSetVisible ( w1 , false ) showCursor ( false ) end end ) 1 minute ago, MR.StoRm said: ورني كلنت 5 minutes ago, MR.StoRm said: ورني كلنت ها اخوي ؟ Link to comment
MR.StoRm Posted September 10, 2017 Share Posted September 10, 2017 GUIEditor = { label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() w1 = guiCreateWindow(158, 120, 422, 366, "Ticket System", false) guiWindowSetSizable(w1, false) guiSetAlpha(w1, 1.00) guiSetProperty(w1, "CaptionColour", "FFCE3094") guiSetVisible ( w1 , false ) b1 = guiCreateButton(116, 84, 204, 62, "شراء التذكرة", false, w1) guiSetFont(b1, "default-bold-small") guiSetProperty(b1, "NormalTextColour", "FFDB00FB") b2 = guiCreateButton(116, 174, 204, 62, "لا أريد", false, w1) guiSetFont(b2, "default-bold-small") guiSetProperty(b2, "NormalTextColour", "FF00F2FA") b3 = guiCreateButton(354, 322, 58, 34, "خروج", false, w1) guiSetFont(b3, "default-bold-small") guiSetProperty(b3, "NormalTextColour", "FFF90000") GUIEditor.label[1] = guiCreateLabel(76, 24, 288, 60, "تذكرة الدراجات : سعر التذكرة 20 الف ", false, w1) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 97, 58, 195) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") GUIEditor.label[2] = guiCreateLabel(10, 329, 110, 37, "", false, w1) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 64, 202, 50) GUIEditor.label[3] = guiCreateLabel(33, 235, 362, 87, "", false, w1) end ) m1 = createMarker ( 2774.73999, -1704.48718, 10.84375,"cylinder", 1.5, 255, 50, 100 ) addEventHandler ( "onClientMarkerHit" , m1 , function ( hitElement ) if ( hitElement == localPlayer ) and ( getElementType ( hitElement ) == 'player' ) then guiSetVisible ( w1 , true ) showCursor ( true) end end ) addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == b1 ) then triggerServerEvent ( "lol" , localPlayer ) guiSetVisible ( w1 , false ) showCursor ( false ) if ( source == b3 ) then guiSetVisible ( w1 , false ) showCursor ( false ) if ( source == b2 ) then guiSetVisible ( w1 , false ) showCursor ( false ) end end end end ) Link to comment
Rockyz Posted September 10, 2017 Share Posted September 10, 2017 (edited) addEvent ( 'lol' , true ) addEventHandler ( 'lol', root, function ( ) if ( getPlayerMoney ( source ) >= 20000 ) then takePlayerMoney ( source, 20000 ) outputChatBox ( 'لقد إشتريت تذكرة الدخول لألعاب الدراجات النارية', source, 0, 255, 0 ) setElementData ( source, 'tick', true ) else outputChatBox ( 'انت لا تملك المال الكافي !!!', source, 255, 0, 0 ) end end ) m1 = createMarker ( 2792.90430, -1721.76599, 12.8, 'arrow', 2, 255, 255, 100 ) addEventHandler ( 'onMarkerHit', m1, function ( hitElement ) if ( getElementType ( hitElement ) == 'player' ) then if ( getElementData ( hitElement, 'tick' ) ) then setElementPosition ( hitElement, 2792, -1721, 12.8 ) else outputChatBox ( 'انت لا تملك المال الكافي !!!', hitElement, 255, 0, 0, true ) end end end ) Edited September 10, 2017 by #,+( _xiRoc[K]; > 1 Link to comment
MR.StoRm Posted September 10, 2017 Share Posted September 10, 2017 2 minutes ago, #,+( _xiRoc[K]; > said: addEvent ( 'lol' , true ) addEventHandler ( 'lol', root, function ( ) if ( getPlayerMoney ( source ) >= 20000 ) then takePlayerMoney ( source, 20000 ) outputChatBox ( 'لقد إشتريت تذكرة الدخول لألعاب الدراجات النارية', source, 0, 255, 0 ) setElementData ( source, 'tick', true ) else outputChatBox ( 'انت لا تملك المال الكافي !!!', source, 255, 0, 0 ) end end ) m1 = createMarker ( 2792.90430, -1721.76599, 12.8, 'arrow', 2, 255, 255, 100 ) addEventHandler ( 'onMarkerHit', m1, function ( hitElement ) if ( getElementType ( hitElement ) == 'player' and getElementData ( hitElement, 'tick' ) ) then setElementPosition ( hitElement, 2792, -1721, 12.8 ) else outputChatBox ( 'انت لا تملك المال الكافي !!!', hitElement, 255, 0, 0, true ) end end ) افا مدري كيف نسيتها , مشكور عالتصحيح Link to comment
#BrosS Posted September 10, 2017 Share Posted September 10, 2017 35 minutes ago, MR.StoRm said: addEvent ( 'lol' , true ) addEventHandler ( 'lol' , root , function ( ) if getPlayerMoney ( source ) >= 20000 then takePlayerMoney ( source , 20000 ) outputChatBox ( "لقد إشتريت تذكرة الدخول لألعاب الدراجات النارية",source, 0,255,0 ) setElementData ( source , "tick" , true ) else outputChatBox ( "انت لا تملك المال الكافي !!!",source, 255,0,0 ) end end ) m1 = createMarker ( 2792.90430, -1721.76599, 12.8,"arrow", 2, 255, 255, 100 ) addEventHandler ( "onMarkerHit" , m1 , function ( hitElement ) if ( getElementType ( hitElement ) == 'player' ) then if ( getElementData ( source , 'tick' ) == true ) then setElementPosition (source , 2792, -1721, 12.8 ) else outputChatBox ( "انت لا تملك المال الكافي !!!",source, 255,0,0 ) end end end ) جرب هذا , وتأكد أنه سيرفر :] تدري هنا سورس ماذا تمثل ؟ Link to comment
MR.StoRm Posted September 10, 2017 Share Posted September 10, 2017 Just now, #BrosS said: تدري هنا سورس ماذا تمثل ؟ ما انتبهت توه روك مصححه وانتبهت له , تأثير الدراسة Link to comment
WTF_ Posted September 10, 2017 Author Share Posted September 10, 2017 11 minutes ago, #BrosS said: تدري هنا سورس ماذا تمثل ؟ أه السورس تمثل الماركر Link to comment
Adham Posted September 10, 2017 Share Posted September 10, 2017 تفضل جرب : 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 ) Link to comment
MR.StoRm Posted September 10, 2017 Share Posted September 10, 2017 (edited) # Deleted * .. ! Edited September 10, 2017 by MR.StoRm Link to comment
Adham Posted September 10, 2017 Share Posted September 10, 2017 (edited) الرجال قال فوق الكود م إشتغل وبعدين قل خيرأ او اصمت Edited September 10, 2017 by Deativated Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now