mr.ekoo Posted June 15, 2013 Share Posted June 15, 2013 كلنت triggerServerEvent("fix", localPlayer) سيرفر addEvent("fix",true) addEventHandler("fix",root, function ( thePlayer ) outputChatBox("fix.",thePlayer,255,255,255,true) end ) Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 thePlayer = ? تقدر تسوية كذا : triggerServerEvent('fix',localPlayer,localPlayer) ويشتغل او هذي : addEvent("fix",true) addEventHandler("fix",root, function ( ) outputChatBox("fix.",client,255,255,255,true) end ) Link to comment
mr.ekoo Posted June 15, 2013 Author Share Posted June 15, 2013 جربت الطريقتين وللحين مو شغال Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 اطرح الكلنت + debugscript 3 وش يقول؟ Link to comment
mr.ekoo Posted June 15, 2013 Author Share Posted June 15, 2013 http://prntscr.com/1a35zo Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 (edited) اذا تقدر تطرح الكود كامل حقك ياليت عشان اساعدكـ .. اللي بالترايقر Edited June 15, 2013 by Guest Link to comment
mr.ekoo Posted June 15, 2013 Author Share Posted June 15, 2013 (edited) كلنت addEventHandler('onClientGUIClick', root, function() if ( source == fix ) then triggerServerEvent("fix",localPlayer,localPlayer) elseif ( source == color ) then triggerServerEvent("color",localPlayer,localPlayer) elseif ( source == engine ) then triggerServerEvent("engine",localPlayer,localPlayer) elseif ( source == lock ) then triggerServerEvent("lock",localPlayer,localPlayer) elseif ( source == light ) then triggerServerEvent("light",localPlayer,localPlayer) end end ) سيرفر addEvent("fix",true) addEventHandler("fix",root, function () local Vehicle = getPedOccupiedVehicle(thePlayer) fixVehicle ( Vehicle ) end ) http://prntscr.com/1a36kq Edited June 15, 2013 by Guest Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 addEvent("fix",true) addEventHandler("fix",root, function ( thePlayer ) if isPedInVehicle ( thePlayer ) then fixVehicle ( getPedOccupiedVehicle(thePlayer) ) end end ) Link to comment
mr.ekoo Posted June 15, 2013 Author Share Posted June 15, 2013 اخوي شوف http://prntscr.com/1a36kq المشكلة بالربط مو بالكود نفسه Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 اكيد ناقص او زايد اند باكواد السيرفر اذا تقدر تطرحة كامل او فاصلة..ألخ Link to comment
mr.ekoo Posted June 15, 2013 Author Share Posted June 15, 2013 طيب طرحته الى فوق بس الى تححته مكرر بس وظايف ثانية ؟ Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 اذا ماتبي تطرحة ارسلة خاص ذذذذ فية مشكلة هو بالسيرفر ذذ Link to comment
mr.ekoo Posted June 15, 2013 Author Share Posted June 15, 2013 سيرفر addEvent("fix",true) addEventHandler("fix",root, function () local Vehicle = getPedOccupiedVehicle(thePlayer) if Vehicle then if (getPlayerMoney (thePlayer) >= 1000) then fixVehicle ( Vehicle ) takePlayerMoney ( thePlayer, 1000 ) outputChatBox("#00FF00Your vehicle has been fixed at $1000.",thePlayer,255,255,255,true) else outputChatBox("#FF0000انت لاتملك المال الكافي.",thePlayer,255,255,255,true) end else outputChatBox("#FF0000You must be a Vehicle.",thePlayer,255,255,255,true) end end ) addEvent("color",true) addEventHandler("color",root, function () local Vehicle = getPedOccupiedVehicle(thePlayer) if Vehicle then if getPlayerMoney (thePlayer) >= 1000 then local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( Vehicle, r, g, b ) takePlayerMoney ( thePlayer, 1000 ) outputChatBox("#00FF00Change the color of your vehicle successfully at $1000.",thePlayer,255,255,255,true) else outputChatBox("انت لاتملك المال الكافي.",thePlayer,255,255,255,true) end else outputChatBox("#FF0000You must be a Vehicle.",thePlayer,255,255,255,true) end end ) addEvent("engine",true) addEventHandler("engine",root, function () executeCommandHandler( 'engine' ) end ) addEvent("lock",true) addEventHandler("lock",root, function () executeCommandHandler( 'lock' ) end ) addEvent("light",true) addEventHandler("light",root, function () executeCommandHandler( 'light' ) end ) Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 addEvent("fix",true) addEventHandler("fix",root, function (thePlayer) local Vehicle = getPedOccupiedVehicle(thePlayer) if Vehicle then if (getPlayerMoney (thePlayer) >= 1000) then fixVehicle ( Vehicle ) takePlayerMoney ( thePlayer, 1000 ) outputChatBox("#00FF00Your vehicle has been fixed at $1000.",thePlayer,255,255,255,true) else outputChatBox("#FF0000انت لاتملك المال الكافي.",thePlayer,255,255,255,true) end else outputChatBox("#FF0000You must be a Vehicle.",thePlayer,255,255,255,true) end end ) addEvent("color",true) addEventHandler("color",root, function (thePlayer) local Vehicle = getPedOccupiedVehicle(thePlayer) if Vehicle then if getPlayerMoney (thePlayer) >= 1000 then local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( Vehicle, r, g, b ) takePlayerMoney ( thePlayer, 1000 ) outputChatBox("#00FF00Change the color of your vehicle successfully at $1000.",thePlayer,255,255,255,true) else outputChatBox("انت لاتملك المال الكافي.",thePlayer,255,255,255,true) end else outputChatBox("#FF0000You must be a Vehicle.",thePlayer,255,255,255,true) end end ) addEvent("engine",true) addEventHandler("engine",root, function (thePlayer) executeCommandHandler( 'engine',thePlayer ) end ) addEvent("lock",true) addEventHandler("lock",root, function () executeCommandHandler( 'lock',thePlayer ) end ) addEvent("light",true) addEventHandler("light",root, function (thePlayer) executeCommandHandler( 'light',thePlayer ) end ) Link to comment
mr.ekoo Posted June 15, 2013 Author Share Posted June 15, 2013 مو شغال + يوم اشغل السكربت http://prntscr.com/1a38f7 يوم اضغط شيئ منه http://prntscr.com/1a38jd Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 اللي تسوي لها اللي بالـخطأ nil > يعني ماهي موجودة تقدر تطرح الكلنت ؟ Link to comment
mr.ekoo Posted June 15, 2013 Author Share Posted June 15, 2013 GUIEditor = { button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(309, 220, 212, 194, "Cars Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) fix = guiCreateButton(15, 30, 79, 39, "fix", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF3B00FF") color = guiCreateButton(113, 30, 79, 39, "color", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF3B00FF") engine = guiCreateButton(15, 84, 79, 39, "engine", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF3B00FF") lock = guiCreateButton(113, 84, 79, 39, "lock", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FF3B00FF") light = guiCreateButton(59, 135, 79, 39, "light", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FF3B00FF") GUIEditor.label[1] = guiCreateLabel(8, 140, 46, 22, "Panel By", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 254, 0, 0) GUIEditor.label[2] = guiCreateLabel(8, 164, 46, 18, "Mr.eKoO", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 44, 251, 3) GUIEditor.button[6] = guiCreateButton(207, 132, 0, 18, "", false, GUIEditor.window[1]) buttonclose = guiCreateButton(166, 150, 21, 20, "x", false, GUIEditor.window[1]) end ) open = function() guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end bindKey ( "F5", "down", open ) addEventHandler ( "onClientGUIClick",root, function () if source == buttonclose then guiSetVisible ( GUIEditor.window[1], false ) showCursor( false ) end end ) addEventHandler('onClientGUIClick', root, function() if ( source == fix ) then triggerServerEvent("fix",localPlayer,localPlayer) elseif ( source == color ) then triggerServerEvent("color",localPlayer,localPlayer) elseif ( source == engine ) then triggerServerEvent("engine",localPlayer,localPlayer) elseif ( source == lock ) then triggerServerEvent("lock",localPlayer,localPlayer) elseif ( source == light ) then triggerServerEvent("light",localPlayer,localPlayer) end end ) Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 GUIEditor = { button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(309, 220, 212, 194, "Cars Panel", false) guiWindowSetSizable(GUIEditor.window[1], false) fix = guiCreateButton(15, 30, 79, 39, "fix", false, GUIEditor.window[1]) guiSetProperty(fix, "NormalTextColour", "FF3B00FF") color = guiCreateButton(113, 30, 79, 39, "color", false, GUIEditor.window[1]) guiSetProperty(color, "NormalTextColour", "FF3B00FF") engine = guiCreateButton(15, 84, 79, 39, "engine", false, GUIEditor.window[1]) guiSetProperty(engine, "NormalTextColour", "FF3B00FF") lock = guiCreateButton(113, 84, 79, 39, "lock", false, GUIEditor.window[1]) guiSetProperty(lock, "NormalTextColour", "FF3B00FF") light = guiCreateButton(59, 135, 79, 39, "light", false, GUIEditor.window[1]) guiSetProperty(light, "NormalTextColour", "FF3B00FF") GUIEditor.label[1] = guiCreateLabel(8, 140, 46, 22, "Panel By", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[1], 254, 0, 0) GUIEditor.label[2] = guiCreateLabel(8, 164, 46, 18, "Mr.eKoO", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[2], 44, 251, 3) GUIEditor.button[6] = guiCreateButton(207, 132, 0, 18, "", false, GUIEditor.window[1]) buttonclose = guiCreateButton(166, 150, 21, 20, "x", false, GUIEditor.window[1]) end ) function open( ) guiSetVisible ( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( guiGetVisible ( GUIEditor.window[1] ) ) end bindKey ( "F5", "down", open ) addEventHandler('onClientGUIClick', root, function() if ( source == fix ) then triggerServerEvent("fix",localPlayer,localPlayer) elseif ( source == color ) then triggerServerEvent("color",localPlayer,localPlayer) elseif ( source == engine ) then triggerServerEvent("engine",localPlayer,localPlayer) elseif ( source == lock ) then triggerServerEvent("lock",localPlayer,localPlayer) elseif ( source == light ) then triggerServerEvent("light",localPlayer,localPlayer) elseif ( source == buttonclose ) then guiSetVisible ( GUIEditor.window[1],false ) showCursor ( false ) end end ) Link to comment
mr.ekoo Posted June 15, 2013 Author Share Posted June 15, 2013 مو شغال http://prntscr.com/1a3c40 Link to comment
iPrestege Posted June 15, 2013 Share Posted June 15, 2013 > ="s.lua" /> ="c.lua" type="client"/>> وتأكد انك حاط الاكواد ب الملف الصحيح Link to comment
mr.ekoo Posted June 15, 2013 Author Share Posted June 15, 2013 http://www.gulfup.com/?2nhukZ Link to comment
mr.ekoo Posted June 15, 2013 Author Share Posted June 15, 2013 كيف مو شغال عندي شسالفته ؟ 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