#Mr.Pop Posted June 11, 2017 Share Posted June 11, 2017 الكود ابي حق تيجير سيرفر ال triggerClientEvent وتصحيح كود Server x, y, size = 970.03174, -1134.88831 , 100, 55 local greenzone = createColRectangle (970.03174, -1134.88831 , 100, 55 ) local greenzonemaparea = createRadarArea ( 970.03174, -1134.88831 , 100, 55,0, 255, 0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end triggerClientEvent(localPlayer,"Safe",localPlayer) Client addEvent("Safe",true) addEventHandler("Safe",root, function() dxDrawRectangle(1009, 485, 256, 87, tocolor(16, 15, 15, 179), false) dxDrawText("Safe Zoon", 1029, 503, 1245, 558, tocolor(70, 254, 13, 179), 2.00, "pricedown", "left", "top", false, false, false, false, false) end ) Link to comment
|M.r|LooFe| Posted June 11, 2017 Share Posted June 11, 2017 x, y, size = 970.03174, -1134.88831 , 100, 55 local greenzone = createColRectangle (970.03174, -1134.88831 , 100, 55 ) local greenzonemaparea = createRadarArea ( 970.03174, -1134.88831 , 100, 55,0, 255, 0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end triggerClientEvent("Safe",localPlayer) هذا ملف سيرفر تم جرب وردلي خبر Link to comment
#Mr.Pop Posted June 11, 2017 Author Share Posted June 11, 2017 (edited) جربت من قبل ومنجح ض شو الحل ؟ Edited June 11, 2017 by mr.pop Link to comment
^iiEcoo'x_) Posted June 11, 2017 Share Posted June 11, 2017 هات الكود كآمل , لانه عندك أخطاء بسطر 7 1 hour ago, |M.r|LooFe| said: x, y, size = 970.03174, -1134.88831 , 100, 55 local greenzone = createColRectangle (970.03174, -1134.88831 , 100, 55 ) local greenzonemaparea = createRadarArea ( 970.03174, -1134.88831 , 100, 55,0, 255, 0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end triggerClientEvent("Safe",localPlayer) هذا ملف سيرفر تم جرب وردلي خبر triggerClientEvent رآجع الأرقيومنت للفنكشن 1 Link to comment
#Mr.Pop Posted June 11, 2017 Author Share Posted June 11, 2017 (edited) ----------------=====_ Server _=====---------------- ----------------Safe1 function outButDxChat ( text, element, r, g, b, vaule ) exports["guimessages"]:outputServer(element, text, r, g, b) end x, y, size = 970.03174, -1134.88831 , 100, 55 local greenzone = createColRectangle (970.03174, -1134.88831 , 100, 55 ) local greenzonemaparea = createRadarArea ( 970.03174, -1134.88831 , 100, 55,0, 255, 0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end triggerClientEvent("Safe",localPlayer) toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) end addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter ) function greenzoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outButDxChat ( "* You Left The Greenzone!", thePlayer, 50, 252, 3 ) toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) end addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit ) ----------------=====_ Client _=====---------------- addEvent("Safe",true) addEventHandler("Safe",root, function() dxDrawRectangle(1009, 485, 256, 87, tocolor(16, 15, 15, 179), false) dxDrawText("Safe Zoon", 1029, 503, 1245, 558, tocolor(70, 254, 13, 179), 2.00, "pricedown", "left", "top", false, false, false, false, false) end ) انا رجعتها بس مفهمة الامثلة الامثلة كلها حق الشت output Edited June 11, 2017 by mr.pop Link to comment
#kAsR Posted June 11, 2017 Share Posted June 11, 2017 (edited) -- Server function outButDxChat ( text, element, r, g, b, vaule ) exports["guimessages"]:outputServer(element, text, r, g, b) end x, y, size = 970.03174, -1134.88831 , 100, 55 local greenzone = createColRectangle (970.03174, -1134.88831 , 100, 55 ) local greenzonemaparea = createRadarArea ( 970.03174, -1134.88831 , 100, 55,0, 255, 0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) triggerClientEvent ( thePlayer , "SatValue" , thePlayer , "show" ); end addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter ) function greenzoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outButDxChat ( "* You Left The Greenzone!", thePlayer, 50, 252, 3 ) toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) triggerClientEvent ( thePlayer , "SatValue" , thePlayer , "hide" ); end addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit ) ---------- Client function dx ( ) dxDrawRectangle(1009, 485, 256, 87, tocolor(16, 15, 15, 179), false) dxDrawText("Safe Zoon", 1029, 503, 1245, 558, tocolor(70, 254, 13, 179), 2.00, "pricedown", "left", "top", false, false, false, false, false) end addEventHandler ( "SatValue" , root , function ( arg ) if ( arg == "show" ) then addEventHandler("onClientRender",root,dx); elseif ( arg == "hide" ) then removeEventHandler("onClientRender",root,dx) end end ) Edited June 11, 2017 by #kAsR Link to comment
#Mr.Pop Posted June 12, 2017 Author Share Posted June 12, 2017 مشكور اخي تسلم معك سكايب ؟ 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