#DRAGON!FIRE Posted June 5, 2013 Author Share Posted June 5, 2013 لآ ورب الكعبة قسم بالله اللي مسعدني يزن والله طيب انت فاهم الاكواد طيب فاهما .؟ Link to comment
#DRAGON!FIRE Posted June 5, 2013 Author Share Posted June 5, 2013 لأ محبط ولا شي عشأنك # لأنك عافس ام الكود # ومو فهمان شي كيف بتفهم Link to comment
iMr.Dawix~# Posted June 5, 2013 Share Posted June 5, 2013 (edited) Client Side: 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 AL-PRNS",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 ) Server Side: 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 ) اكوادك صحيحه بس زايد قوس بالكلنت وناقص قوس بالسيرفر + للمره المليون ممنوع مشاركات ورا بعض ما تعرف تعدل على ردك؟ Edit كلها ضغطة زر على زر Edited June 5, 2013 by Guest Link to comment
iMr.Dawix~# Posted June 5, 2013 Share Posted June 5, 2013 صلحته خلاص اجل ليه حاط لك الأكواد استعارض ؟ Link to comment
iMr.Dawix~# Posted June 5, 2013 Share Posted June 5, 2013 مشكور اشتغل بس ابي شيء اخليها 4 + لونها ازرق تعرف؟؟ 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, 0, 0, 255, 255 ) end end ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(258,129,228,368,"By AL-PRNS",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 ) شوف الكود لازم تفهمه ----------------------------client createMarker(x,y,z,string TheType, size , red, green, blue,alpha) 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