ahmed1010 Posted March 29, 2014 Share Posted March 29, 2014 (edited) المشكلة هى انى بحاول اعملل ماركر سيارات لجروب اف بى اى و لتيم الشطرة بنفس الوقت بس الماركر يظهر لكن لا يشتغل يظهر بس دا كلينت UIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Marker = {} GUIEditor_Window = {} local marker = {} vehicleId = {523,480,497,522,490,522,427,601,411} marker = createMarker(1021.5999755859,-1450.5999755859,12.60000038147,"cylinder",1.5,0,100,0,220) marker2 = createMarker(1024.4000244141,-1441,12.39999961853,"cylinder",1.5,0,100,0,220) local x,y = guiGetScreenSize() local x = x - 208 local y = y - 321 GUIEditor_Window[1] = guiCreateWindow(500,147,246,413,"Select Car",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,34,228,255,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.5) GUIEditor_Button[2] = guiCreateButton(20,308,210,41,"Select",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(20,352,210,41,"Close",false,GUIEditor_Window[1]) for i,id in ipairs ( vehicleId ) do guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) end addEventHandler ("onClientMarkerHit", marker, function( player ) if getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'Police' and not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "gang" ) == "|F.B.I|" then x999,y999,z999 = getElementPosition( localPlayer ) setElementFrozen ( localPlayer, true ) guiSetVisible(GUIEditor_Window[1],true) showCursor( true ) end end ) addEventHandler('onClientGUIClick', root, function() if ( source == GUIEditor_Button[1] ) then guiSetVisible(GUIEditor_Window[1],false) showCursor( false ) setElementFrozen ( localPlayer, false ) elseif ( source == GUIEditor_Button[2] ) then local name = guiGridListGetItemText( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) triggerServerEvent('gvoa', getLocalPlayer(), name) guiSetVisible(GUIEditor_Window[1],false) setElementFrozen ( localPlayer, false ) showCursor( false ) end end و لما عملت debugscript 3 client.lua24 attempt to index gobal 'GuiEditor'-button'(a nill value) client.lua23 attempt to index gobal 'GuiEditor'-button'(a nill value) ممكن مساعدة Edited March 29, 2014 by Guest Link to comment
EH10 Posted March 29, 2014 Share Posted March 29, 2014 ياأخي بدل الوضعية حقت الكود لـ lua مشان نشوف الكود زين Link to comment
' ρяofзśŝoя 亗 Posted March 29, 2014 Share Posted March 29, 2014 جرببءَ ~ GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Marker = {} GUIEditor_Window = {} local marker = {} vehicleId = {523,480,497,522,490,522,427,601,411} marker = createMarker(1021.5999755859,-1450.5999755859,12.60000038147,"cylinder",1.5,0,100,0,220) marker2 = createMarker(1024.4000244141,-1441,12.39999961853,"cylinder",1.5,0,100,0,220) local x,y = guiGetScreenSize() local x = x - 208 local y = y - 321 GUIEditor_Window[1] = guiCreateWindow(500,147,246,413,"Select Car",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,34,228,255,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.5) GUIEditor_Button[2] = guiCreateButton(20,308,210,41,"Select",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(20,352,210,41,"Close",false,GUIEditor_Window[1]) for i,id in ipairs ( vehicleId ) do guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) end addEventHandler ("onClientMarkerHit", marker, function( player ) if getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'Police' and not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "gang" ) == "|F.B.I|" then x999,y999,z999 = getElementPosition( localPlayer ) setElementFrozen ( localPlayer, true ) guiSetVisible(GUIEditor_Window[1],true) showCursor( true ) end end ) addEventHandler('onClientGUIClick', root, function() if ( source == GUIEditor_Button[1] ) then guiSetVisible(GUIEditor_Window[1],false) showCursor( false ) setElementFrozen ( localPlayer, false ) elseif ( source == GUIEditor_Button[2] ) then local name = guiGridListGetItemText( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) triggerServerEvent('gvoa', getLocalPlayer(), name) guiSetVisible(GUIEditor_Window[1],false) setElementFrozen ( localPlayer, false ) showCursor( false ) end end Link to comment
ahmed1010 Posted March 29, 2014 Author Share Posted March 29, 2014 جرببءَ ~ GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Marker = {} GUIEditor_Window = {} local marker = {} vehicleId = {523,480,497,522,490,522,427,601,411} marker = createMarker(1021.5999755859,-1450.5999755859,12.60000038147,"cylinder",1.5,0,100,0,220) marker2 = createMarker(1024.4000244141,-1441,12.39999961853,"cylinder",1.5,0,100,0,220) local x,y = guiGetScreenSize() local x = x - 208 local y = y - 321 GUIEditor_Window[1] = guiCreateWindow(500,147,246,413,"Select Car",false) guiSetVisible(GUIEditor_Window[1],false) guiSetAlpha(GUIEditor_Window[1],1) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,34,228,255,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",0.5) GUIEditor_Button[2] = guiCreateButton(20,308,210,41,"Select",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(20,352,210,41,"Close",false,GUIEditor_Window[1]) for i,id in ipairs ( vehicleId ) do guiGridListSetItemText ( GUIEditor_Grid[1], guiGridListAddRow( GUIEditor_Grid[1] ), column, getVehicleNameFromModel( id ), false, false ) end addEventHandler ("onClientMarkerHit", marker, function( player ) if getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'Police' and not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "gang" ) == "|F.B.I|" then x999,y999,z999 = getElementPosition( localPlayer ) setElementFrozen ( localPlayer, true ) guiSetVisible(GUIEditor_Window[1],true) showCursor( true ) end end ) addEventHandler('onClientGUIClick', root, function() if ( source == GUIEditor_Button[1] ) then guiSetVisible(GUIEditor_Window[1],false) showCursor( false ) setElementFrozen ( localPlayer, false ) elseif ( source == GUIEditor_Button[2] ) then local name = guiGridListGetItemText( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) triggerServerEvent('gvoa', getLocalPlayer(), name) guiSetVisible(GUIEditor_Window[1],false) setElementFrozen ( localPlayer, false ) showCursor( false ) end end اشتغل بس فهمنى وش عملت؟ Link to comment
' ρяofзśŝoя 亗 Posted March 29, 2014 Share Posted March 29, 2014 اشتغل بس فهمنى وش عملت؟ ككآن عندكك الغلط في سطر 1 انت حاطهه هيككءَ UIEditor_Button = {} واسماء الازرار GUIEditor_Button[2] GUIEditor_Button[1] يكون عندك غلط ب اسم المتغير وتقدر تحذف السطر الاول But1 , But2 وتخلي اسم الزر مثلا Link to comment
ahmed1010 Posted March 30, 2014 Author Share Posted March 30, 2014 طلب كمان لو سمحت ableCars = {} addEvent('gvoa', true) addEventHandler('gvoa', root, function( nameCar ) if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end local id = getVehicleModelFromName( nameCar ) if id == 497 then local x, y, z = unpack( AircraftIdSpawn[math.random(#AircraftIdSpawn)] ) TableCars[source] = createVehicle( 497,939.90002441406,-1468,32.299999237061) if not TableCars[source] then return end warpPedIntoVehicle ( source, TableCars[source] ) return end local x,y,z = getElementPosition( source ) TableCars[source] = createVehicle( id, x,y,z ) if not TableCars[source] then return end warpPedIntoVehicle ( source, TableCars[source] ) addVehicleUpgrade(TableCars[source], 1147) addVehicleUpgrade(TableCars[source], 1041) addVehicleUpgrade(TableCars[source], 1035) addVehicleUpgrade(TableCars[source], 1010) addVehicleUpgrade(TableCars[source], 1171) addVehicleUpgrade(TableCars[source], 1149) setVehiclePaintjob(TableCars[source], 1) end ) addEventHandler('onPlayerQuit', root, function() if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end end ) addEventHandler("onVehicleStartEnter", getResourceRootElement(getThisResource()), function(player,seat) if getElementData( player, 'gang' ) == "|F.B.I|" and getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'No Team' then return end if seat == 0 then outputChatBox("gang " .. "|F.B.I|" .. " Only", player, 255, 0, 0, true) cancelEvent() end end ) عايز الطائرة تروح على مكان ثانى الاحداضيات اللى انا حاطتها بس ما تروح مدرى ليش Link to comment
ahmed1010 Posted March 30, 2014 Author Share Posted March 30, 2014 عند عمل debugscript 3 يقول : sever.lua11 attempt to get length of gobal AircraftIdSpawn '(a nill value) Link to comment
ahmed1010 Posted March 30, 2014 Author Share Posted March 30, 2014 ازاى؟ مش فاهم وضح شوى لو سمحت Link to comment
abu5lf Posted March 30, 2014 Share Posted March 30, 2014 السطر واحد في ملف السيرفر حط TableCars = { } + كودك فيه اخطاء كثيرة اذا ماشتغل شف وش يطلع لك /debugscript 3 Link to comment
' ρяofзśŝoя 亗 Posted March 30, 2014 Share Posted March 30, 2014 ككل اكوادكك ناقصه حرف ذذ وش قصتك ><" Link to comment
ahmed1010 Posted March 31, 2014 Author Share Posted March 31, 2014 هههههههههه محطوط لكن انا كتبته بالمنتدى هيك لكن المشكلة الاصلية مو هون عند sever.lua11 attempt to get length of gobal AircraftIdSpawn '(a nill value) Link to comment
ahmed1010 Posted March 31, 2014 Author Share Posted March 31, 2014 يعنى اعمل ايه شبااااااااب Link to comment
#DRAGON!FIRE Posted March 31, 2014 Share Posted March 31, 2014 مهو موجود ذذ .. حطه بـ الكود حقكـ ( AircraftIdSpawn ) تيبل Link to comment
abu5lf Posted March 31, 2014 Share Posted March 31, 2014 هههههههههه محطوط لكن انا كتبته بالمنتدى هيك لكن المشكلة الاصلية مو هون عند sever.lua11 attempt to get length of gobal AircraftIdSpawn '(a nill value) احذف السطر ١١ اللي فيه AircraftIdSpawn لاني اشوفك ماتستخدمه 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