yazan Posted February 23, 2013 Share Posted February 23, 2013 سلام عليكم الحمد الله سرت اعتمد على نفسي بشكل بسيط عملت الكود هذى و فيه غلط الكود عباره عن مارك لو تدخله تجيك لوحه فيها زر و تخذ فلوس yazan = createMarker( 1365, -1275.5, 13.5" cylinder", 2, 255, 255, 255, 150 ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(522,202,182,94,"by yaZan",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(18,30,149,53,"Money",false,GUIEditor_Window[1]) function open() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) end addEventHandler("onClientMarkerHit", yazan, GUIEditor_Window[1]) addEventHandler( "onClientGUIClick", root, function money = getPlayerMoney(thePlayer) if (money > 100) then outputChatBox('You took money',255, 255, 0, true ) Link to comment
jafar Posted February 23, 2013 Share Posted February 23, 2013 سلام عليكم الحمد الله سرت اعتمد على نفسي بشكل بسيط عملت الكود هذى و فيه غلط الكود عباره عن مارك لو تدخله تجيك لوحه فيها زر و تخذ فلوس yazan = createMarker( 1365, -1275.5, 13.5" cylinder", 2, 255, 255, 255, 150 ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(522,202,182,94,"by yaZan",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(18,30,149,53,"Money",false,GUIEditor_Window[1]) function open() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) end addEventHandler("onClientMarkerHit", yazan, GUIEditor_Window[1]) addEventHandler( "onClientGUIClick", root, function money = getPlayerMoney(thePlayer) if (money > 100) then outputChatBox('You took money',255, 255, 0, true ) سو ترقر حق يعطيه فلوس Link to comment
iPrestege Posted February 23, 2013 Share Posted February 23, 2013 (edited) Client Side : yazan = createMarker( 1365, -1275.5, 13.5,"cylinder", 2, 255, 255, 255, 150 ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(522,202,182,94,"by yaZan",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(18,30,149,53,"Money",false,GUIEditor_Window[1]) function open(player) if ( player == localPlayer ) then guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end end addEventHandler("onClientMarkerHit", yazan, open) addEventHandler("onClientGUIClick",GUIEditor_Button[1], function () triggerServerEvent("take",localPlayer) guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end ) Server Side : addEvent("take",true) addEventHandler("take",root, function () givePlayerMoney(source,100) outputChatBox("You Take 100 $ !",source,0,255,0,true) end) Edited February 23, 2013 by Guest Link to comment
TAPL Posted February 23, 2013 Share Posted February 23, 2013 function open() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end addEventHandler("onClientMarkerHit", yazan, open) ^^ function open(player) if player == localPlayer then guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end end addEventHandler("onClientMarkerHit", yazan, open) Link to comment
iPrestege Posted February 23, 2013 Share Posted February 23, 2013 function open() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end addEventHandler("onClientMarkerHit", yazan, open) ^^ function open(player) if player == localPlayer then guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end end addEventHandler("onClientMarkerHit", yazan, open) Thanks I forgot this thing # Edited . Link to comment
yazan Posted February 23, 2013 Author Share Posted February 23, 2013 مشكورين بس شلون اخليه له وقت يعطيك يعني لو لاعب اخد ما يقدر يخد غير بعد دقيقه و الكود بيكون للاعب نفسه بس يعني مو للكل Link to comment
#Al-Ha[J]aRii Posted February 23, 2013 Share Posted February 23, 2013 مشكورين بس شلون اخليه له وقت يعطيك يعني لو لاعب اخد ما يقدر يخد غير بعد دقيقه و الكود بيكون للاعب نفسه بس يعني مو للكل setTimer Link to comment
iPrestege Posted February 23, 2013 Share Posted February 23, 2013 addEventHandler("onClientGUIClick",root, function () if ( source == GUIEditor_Button[1] ) then triggerServerEvent("take",localPlayer) guiSetEnabled(GUIEditor_Button[1],false) guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) setTimer(function() guiSetEnabled(GUIEditor_Button[1],true) end, 60000, 1) end end ) بدلة باللي عندك ذذ Link to comment
yazan Posted February 23, 2013 Author Share Posted February 23, 2013 مشكور الكود شغال 100/100 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