MOMO3011 Posted November 23, 2013 Share Posted November 23, 2013 السلام عليكم اواجه مشكلة بكود ماركر السيارات حق المقرات و هي عندم ادهب لماركر الكود تطلعع لي لوحة السيارات عادي بس لما اختار السيارة ما تجيبي . ابقا في مكاني ما يجيني لا سياراة ولا موتور دا الكود ===> سيرفر <===== TableCars = {} addEvent('gvoa', true) addEventHandler('gvoa', root, function( nameCar ) if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end local id = getVehicleModelFromName( nameCar ) if id == 487 or id == 548 then local x, y, z = unpack( AircraftIdSpawn[math.random(#AircraftIdSpawn)] ) TableCars[source] = createVehicle( id, x, y, z ) 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, 'Group' ) == groupName and getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'No Team' then return end if seat == 0 then outputChatBox("Group " .. groupName .. " Only", player, 255, 0, 0, true) cancelEvent() end end ) ===> كلينت <==== GUIEditor_Button = {} GUIEditor_Grid = {} GUIEditor_Marker = {} GUIEditor_Window = {} local marker = {} local groupName = 'هنا اسم العصابة' vehicleId = {510,434,548,487,522,463,556,431,535,409,562,560} marker = createMarker(2065.1000976563,538.40002441406,16.39999961853,"cylinder",3,0,0,0,255) 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 ) ) == 'No Team' and not isPedInVehicle( player ) and player == localPlayer and getElementData ( player , "Group" ) == groupName 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
al-Kobra Posted November 23, 2013 Share Posted November 23, 2013 وش يطلع لك في الديبوق ؟؟ debugscript 3 Link to comment
al-Kobra Posted November 23, 2013 Share Posted November 23, 2013 ===> سيرفر <===== TableCars = {} addEvent('gvoa', true) addEventHandler('gvoa', root, function( nameCar ) if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end local id = getVehicleModelFromName( nameCar ) if id == 487 or id == 548 then local x, y, z = unpack( AircraftIdSpawn[math.random(#AircraftIdSpawn)] ) TableCars[source] = createVehicle( id, x, y, z ) 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, 'Group' ) == groupName and getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'No Team' then return end if seat == 0 then outputChatBox("Group " .. groupName .. " Only", player, 255, 0, 0, true) cancelEvent() end end ) Link to comment
MOMO3011 Posted November 23, 2013 Author Share Posted November 23, 2013 وش عدلت بالزبط ? و هل اضع انا شي ولا لا ? Link to comment
al-Kobra Posted November 23, 2013 Share Posted November 23, 2013 وش عدلت بالزبط ?و هل اضع انا شي ولا لا ? انت كنت مسوي if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end وانا سويتها كذا if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end ضبط معاك ولا لا ؟ Link to comment
MOMO3011 Posted November 23, 2013 Author Share Posted November 23, 2013 نعم اخي شكرا شغلت معاي لو ممكن ابي الطيارة تجي في احداتيات لوحدها و التاني ما يقدر حد اخر ياخد سيارات الجروب غير الجروب Link to comment
K1NG Posted November 23, 2013 Share Posted November 23, 2013 وش عدلت بالزبط ?و هل اضع انا شي ولا لا ? انت كنت مسوي if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end وانا سويتها كذا if isElement( TableCars[source] ) then destroyElement( TableCars[source] ) end ضبط معاك ولا لا ؟ نعم اخي شكرا شغلت معاي لو ممكن ابي الطيارة تجي في احداتيات لوحدها و التاني ما يقدر حد اخر ياخد سيارات الجروب غير الجروب اصـلاً عــآدي وبعدين طلبكـ ذا مكرر بالقسم 92196236253699754379439783487437984920313912 مرة 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