#!CrIsPoD Posted May 25, 2013 Share Posted May 25, 2013 السلام عليكم شباب شخباركم انشاء الله بخير المهم شباب ياليت تحولون لي الكود هذا GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} car = { {579}, {400}, {404}, {489}, {505}, {487}, } local teamName = "Gang" local marker = createMarker(1537.4278564453, -1683.8894042969, 13.546875, "cylinder", 1.5, 255 ,255, 255, 155) local blip = createBlip ( 1537.4278564453 , -1683.8894042969 , 13.546875 , 55 ) local marker2 = createMarker(2480.1962890625, -1751.3967285156, 13.546875, "cylinder", 1.5, 255 ,255, 255, 155) local blip2 = createBlip ( 2480.1962890625 , -1751.3967285156 , 13.546875 , 55 ) local marker3 = createMarker(288.95376586914, -1516.1473388672, 24.59375, "cylinder", 1.5, 255 ,255, 255, 155) local blip3 = createBlip ( 288.95376586914 , -1516.1473388672 , 24.59375 , 55 ) GUIEditor_Window[1] = guiCreateWindow(312,152,165,339,"vehicle",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,19,147,274,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",60) GUIEditor_Button[1] = guiCreateButton(9,296,69,34,"ok",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(86,296,70,34,"close",false,GUIEditor_Window[1]) for i,v in ipairs (car) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, carName, false, true) end function onClientClick (button, state, absoluteX, absoluteYe) if (source == GUIEditor_Button[1]) then if (guiGridListGetSelectedItem (GUIEditor_Grid[1])) then local car = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 1) triggerServerEvent ("cars", getLocalPlayer(), car) end end end addEventHandler ("onClientGUIClick", GUIEditor_Button[1], onClientClick) function onClientClick (button, state, absoluteX, absoluteYe) if (source == GUIEditor_Button[2]) then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", GUIEditor_Button[2], onClientClick) addEventHandler("onClientMarkerHit", marker, function ( hitPlayer, matchingDimension ) if ( isElementWithinMarker(hitPlayer, marker) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor_Window[1], true ) showCursor(true) end else outputChatBox ( "you not in the Gang team", player, 255, 0, 0, true ) end end end) addEventHandler("onClientMarkerHit", marker2, function ( hitPlayer, matchingDimension ) if ( isElementWithinMarker(hitPlayer, marker2) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor_Window[1], true ) showCursor(true) end else outputChatBox ( "you not in the Gang team", player, 255, 0, 0, true ) end end end) addEventHandler("onClientMarkerHit", marker3, function ( hitPlayer, matchingDimension ) if ( isElementWithinMarker(hitPlayer, marker3) ) then if ( getTeamName( getPlayerTeam( hitPlayer ) ) == teamName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor_Window[1], true ) showCursor(true) end else outputChatBox ( "you not in the Gang team", player, 255, 0, 0, true ) end end end) ابيه مو الي بالتيم ياخذ موتر ابي الي بالقروب ياخذ موتر وياليت تخلونه ع القروب سيستيم حق castillo Link to comment
кιηg-αвα∂у Posted May 25, 2013 Share Posted May 25, 2013 GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Grid = {} car = { {579}, {400}, {404}, {489}, {505}, {487}, } local GangName = "اسم القروب" -- حط اسم القروب local marker = createMarker(1537.4278564453, -1683.8894042969, 13.546875, "cylinder", 1.5, 255 ,255, 255, 155) local blip = createBlip ( 1537.4278564453 , -1683.8894042969 , 13.546875 , 55 ) local marker2 = createMarker(2480.1962890625, -1751.3967285156, 13.546875, "cylinder", 1.5, 255 ,255, 255, 155) local blip2 = createBlip ( 2480.1962890625 , -1751.3967285156 , 13.546875 , 55 ) local marker3 = createMarker(288.95376586914, -1516.1473388672, 24.59375, "cylinder", 1.5, 255 ,255, 255, 155) local blip3 = createBlip ( 288.95376586914 , -1516.1473388672 , 24.59375 , 55 ) GUIEditor_Window[1] = guiCreateWindow(312,152,165,339,"vehicle",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(9,19,147,274,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"vehicle name",60) GUIEditor_Button[1] = guiCreateButton(9,296,69,34,"ok",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(86,296,70,34,"close",false,GUIEditor_Window[1]) for i,v in ipairs (car) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (GUIEditor_Grid[1]) guiGridListSetItemText (GUIEditor_Grid[1], row, 1, carName, false, true) end function onClientClick (button, state, absoluteX, absoluteYe) if (source == GUIEditor_Button[1]) then if (guiGridListGetSelectedItem (GUIEditor_Grid[1])) then local car = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 1) triggerServerEvent ("cars", getLocalPlayer(), car) end end end addEventHandler ("onClientGUIClick", GUIEditor_Button[1], onClientClick) function onClientClick2 (button, state, absoluteX, absoluteYe) if (source == GUIEditor_Button[2]) then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", GUIEditor_Button[2], onClientClick2) addEventHandler("onClientMarkerHit", marker, function ( hitPlayer, matchingDimension ) if ( isElementWithinMarker(hitPlayer, marker) ) then if ( getElementData ( hitPlayer, "gang" ) == GangName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor_Window[1], true ) showCursor(true) end else outputChatBox ( "you not in the Gang team", player, 255, 0, 0, true ) end end end) addEventHandler("onClientMarkerHit", marker2, function ( hitPlayer, matchingDimension ) if ( isElementWithinMarker(hitPlayer, marker2) ) then if ( getElementData ( hitPlayer, "gang" ) == GangName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor_Window[1], true ) showCursor(true) end else outputChatBox ( "you not in the Gang team", player, 255, 0, 0, true ) end end end) addEventHandler("onClientMarkerHit", marker3, function ( hitPlayer, matchingDimension ) if ( isElementWithinMarker(hitPlayer, marker3) ) then if ( getElementData ( hitPlayer, "gang" ) == GangName ) then if getElementType(hitPlayer) == "player" then guiSetVisible ( GUIEditor_Window[1], true ) showCursor(true) end else outputChatBox ( "you not in the Gang team", player, 255, 0, 0, true ) 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