iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 أخطائك ما أستخدمت الفنكشن الي حطيته لك بالصفحة الي قبل getVehicleIDFromName الفروض تحط اللوب والتحقق قبل الترايقر -- Client side addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(294, 202, 475, 393, "", false) guiWindowSetSizable(wnd, false) btn = guiCreateButton(65, 245, 350, 93, "Get a Car", false, wnd) guiSetProperty(btn, "NormalTextColour", "FFAAAAAA") edt = guiCreateEdit(164, 127, 131, 54, "", false, wnd) end ) Table = { "Master","Monster","Faster" } addEventHandler ( "onClientGUIClick", root, function () if ( source == btn ) then local veha = guiGetText(edt) for _,i in pairs ( Table ) do if not string.find(veha,Table) then return end triggerServerEvent( "GiveCar", localPlayer, veha ) end end ) -- Server side addEvent ( "GiveCar", true ) addEventHandler ( "GiveCar", root, function ( veha ) local ID = getVehicleModelFromName ( veha ) if isElement ( Vehicle[source] ) then destroyElement ( Vehicle[source] ) else local x, y, z = getElementPosition ( source ) Vehicle[source] = createVehicle ( ID, x, y, z ) addVehicleUpgrade ( Vehicle[source], 1074 ) addVehicleUpgrade ( Vehicle[source], 1087 ) addVehicleUpgrade ( Vehicle[source], 1010 ) attachElements ( Marker,Vehicle[source] , 0, 0, 2 ) outputChatBox("Welcome To The Car", source, 255, 0, 0) warpPedIntoVehicle ( source, Vehicle[source] ) end end ) addEventHandler ( "onVehicleExplode", resourceRoot, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) addEventHandler ( "onPlayerQuit", resourceRoot, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) Link to comment
z24d Posted August 11, 2015 Author Share Posted August 11, 2015 أخطائكما أستخدمت الفنكشن الي حطيته لك بالصفحة الي قبل getVehicleIDFromName الفروض تحط اللوب والتحقق قبل الترايقر -- Client side addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(294, 202, 475, 393, "", false) guiWindowSetSizable(wnd, false) btn = guiCreateButton(65, 245, 350, 93, "Get a Car", false, wnd) guiSetProperty(btn, "NormalTextColour", "FFAAAAAA") edt = guiCreateEdit(164, 127, 131, 54, "", false, wnd) end ) Table = { "Master","Monster","Faster" } addEventHandler ( "onClientGUIClick", root, function () if ( source == btn ) then local veha = guiGetText(edt) for _,i in pairs ( Table ) do if not string.find(veha,Table) then return end triggerServerEvent( "GiveCar", localPlayer, veha ) end end ) -- Server side addEvent ( "GiveCar", true ) addEventHandler ( "GiveCar", root, function ( veha ) local ID = getVehicleModelFromName ( veha ) if isElement ( Vehicle[source] ) then destroyElement ( Vehicle[source] ) else local x, y, z = getElementPosition ( source ) Vehicle[source] = createVehicle ( ID, x, y, z ) addVehicleUpgrade ( Vehicle[source], 1074 ) addVehicleUpgrade ( Vehicle[source], 1087 ) addVehicleUpgrade ( Vehicle[source], 1010 ) attachElements ( Marker,Vehicle[source] , 0, 0, 2 ) outputChatBox("Welcome To The Car", source, 255, 0, 0) warpPedIntoVehicle ( source, Vehicle[source] ) end end ) addEventHandler ( "onVehicleExplode", resourceRoot, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) addEventHandler ( "onPlayerQuit", resourceRoot, function ( ) if ( isElement ( Vehicle[source] ) ) then destroyElement ( Vehicle[source] ) Vehicle[source] = nil end end ) ERROR: Loading script failed gere\client.lua:24: unexpected symbol near ')' Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 الدي بق يقول الخطأ هنا triggerServerEvent( "GiveCar", localPlayer, veha ) ومافي خطأ متأكد أخذت أكوادي ؟ شكلك حطيت أكواد زايدة سوي ريستارت للسكربت Link to comment
iMr.Dawix~# Posted August 11, 2015 Share Posted August 11, 2015 if حق الـ end ناقص -- Client side addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(294, 202, 475, 393, "", false) guiWindowSetSizable(wnd, false) btn = guiCreateButton(65, 245, 350, 93, "Get a Car", false, wnd) guiSetProperty(btn, "NormalTextColour", "FFAAAAAA") edt = guiCreateEdit(164, 127, 131, 54, "", false, wnd) end ) Table = { "Master","Monster","Faster" } addEventHandler("onClientGUIClick",root,function () if ( source == btn ) then local veha = guiGetText(edt) for _,i in pairs ( Table ) do if not string.find(veha,Table) then return end triggerServerEvent( "GiveCar", localPlayer, veha ) end end end ) Link to comment
z24d Posted August 11, 2015 Author Share Posted August 11, 2015 addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(294, 202, 475, 393, "", false) guiWindowSetSizable(wnd, false) btn = guiCreateButton(65, 245, 350, 93, "Get a Car", false, wnd) guiSetProperty(btn, "NormalTextColour", "FFAAAAAA") edt = guiCreateEdit(164, 127, 131, 54, "", false, wnd) end ) Table = { "Master","Monster","Faster" } addEventHandler("onClientGUIClick",root,function () if ( source == btn ) then local veha = guiGetText(edt) for _,i in pairs ( Table ) do if not string.find(veha,Table) then outputChatBox("Wrong",255,255,0) return end triggerServerEvent( "GiveCar", localPlayer, veha ) end end end ) انا ابيه كذا يعني يطلع للاعب اذا كتب ماستر ورونق بالشاتبوكس فهمتو ؟ ماضبط Link to comment
iMr.SFA7 Posted August 11, 2015 Share Posted August 11, 2015 addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(294, 202, 475, 393, "", false) guiWindowSetSizable(wnd, false) btn = guiCreateButton(65, 245, 350, 93, "Get a Car", false, wnd) guiSetProperty(btn, "NormalTextColour", "FFAAAAAA") edt = guiCreateEdit(164, 127, 131, 54, "", false, wnd) end ) Table = { "Master","Monster","Faster" } addEventHandler("onClientGUIClick",root,function () if ( source == btn ) then local veha = guiGetText(edt) for _,i in pairs ( Table ) do if not string.find(veha,i) then return outputChatBox("Wrong",255,255,0) end triggerServerEvent( "GiveCar", localPlayer, veha ) end end end ) Link to comment
z24d Posted August 11, 2015 Author Share Posted August 11, 2015 addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(294, 202, 475, 393, "", false) guiWindowSetSizable(wnd, false) btn = guiCreateButton(65, 245, 350, 93, "Get a Car", false, wnd) guiSetProperty(btn, "NormalTextColour", "FFAAAAAA") edt = guiCreateEdit(164, 127, 131, 54, "", false, wnd) end ) Table = { "Master","Monster","Faster" } addEventHandler("onClientGUIClick",root,function () if ( source == btn ) then local veha = guiGetText(edt) for _,i in pairs ( Table ) do if not string.find(veha,i) then return outputChatBox("Wrong",255,255,0) end triggerServerEvent( "GiveCar", localPlayer, veha ) end end end ) والله ماضبط يطلعلي ورونق علا كل شيء ومايطلع سيآرة ! 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