TAPL Posted April 22, 2015 Posted April 22, 2015 إذا كنت من النوع الأول createMarker getElementType getPlayerTeam getTeamName createVehicle warpPedIntoVehicle 'onMarkerHit' إذا كنت من النوع الثاني و انتظر احد يتفضل و يعطيك الجاهز
saifProgenuis Posted April 22, 2015 Author Posted April 22, 2015 إذا كنت من النوع الأول createMarker getElementType getPlayerTeam getTeamName createVehicle warpPedIntoVehicle 'onMarkerHit' إذا كنت من النوع الثاني و انتظر احد يتفضل و يعطيك الجاهز اوك و لو تسمح تعطهولي جاهز
saifProgenuis Posted April 22, 2015 Author Posted April 22, 2015 إذا كنت من النوع الأول createMarker getElementType getPlayerTeam getTeamName createVehicle warpPedIntoVehicle 'onMarkerHit' إذا كنت من النوع الثاني و انتظر احد يتفضل و يعطيك الجاهز
</Mr.Tn6eL> Posted April 22, 2015 Posted April 22, 2015 مانقدر نعطيك جاهز بس تجي مدرعم ماتدري وش وتبي جاهز مايصير الاكواد واضحة وعندك امثلة وعندك كل شي سهل وعندك شروحات بالقسم
yazan Posted April 22, 2015 Posted April 22, 2015 كلنت # Markers = { [1] = { 1556, -1608.4000244141, 13.39999961853 }, [2] = { 1587.3000488281, -1677.5999755859, 5.9000000953674 }, [3] = { 1572.4000244141, -1609.6999511719, 13.39999961853 }, [4] = { 1537.1999511719, -1673.0999755859, 13.39999961853 }, } addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) for _, TheMarkers in ipairs ( Markers ) do TheMarker = createMarker ( TheMarkers[1], TheMarkers[2], TheMarkers[3] - 1, "cylinder", 2, 25, 205, 100, 150 ) end end ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(258,129,228,368,"By yaZan",false) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(32,66,173,70,"LS",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(17,25,197,36,"police car",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(34,138,173,70,"HPv1000",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(34,209,173,70,"Enforcer",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(34,280,173,70,"ranger",false,GUIEditor_Window[1]) addEventHandler ( "onClientMarkerHit", resourceRoot, function ( hitPlayer ) if hitPlayer == localPlayer then local team = getPlayerTeam ( hitPlayer ) if team and getTeamName ( team ) == "police" then guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) end end end ) function givecar ( id ) triggerServerEvent ( "givecar", localPlayer, id ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible(GUIEditor_Window[1] ) ) guiSetInputEnabled ( guiGetVisible ( GUIEditor_Window[1] ) ) end addEventHandler( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[1] ) then givecar(596) elseif ( source == GUIEditor_Button[6] ) then givecar(523) elseif ( source == GUIEditor_Button[3] ) then givecar(427) elseif ( source == GUIEditor_Button[4] ) then givecar(599) end end ) سيرفر# Vehicles = {} addEvent ( "givecar", true ) addEventHandler ( "givecar", root, function ( id ) if Vehicles [ source ] then destroyElement ( Vehicles [ source ] ) end if tonumber( id ) then local x, y, z = getElementPosition ( source ) Vehicles [ source ] = createVehicle ( tonumber( id ), x, y, z ) if Vehicles [ source ] then warpPedIntoVehicle ( source, Vehicles [ source ] ) end end end )
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