-
Posts
366 -
Joined
-
Last visited
-
Days Won
2
Everything posted by H25
-
function tankHat ( commandName ) local x, y, z = getElementPosition ( localPlayer ) tank = createObject ( 1429, x, y , z, 0, 0, 0 ) end addCommandHandler ( "hat", tankHat ) function brake() if isElement(tank) then destroyElement(tank) end end bindKey("x", "down", brake)
-
Teams = { ["Police"] = {1154.412109375, -639.7060546875, 104.15550231934 }; ["Army"] = {1236.359375, -619.701171875, 103.74805450439 }; } GUIEditor = { gridlist = {}, button = {} } wnd = guiCreateWindow(324, 140, 394, 514, "الآنتقالات", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd, false ) GUIEditor.button[1] = guiCreateButton(64, 439, 244, 65, "انتقال", false, wnd) guiSetProperty(GUIEditor.button[1],"NormalTextColour", "FF00FF00") gr = guiCreateGridList(30, 72, 324, 363, false, wnd) guiGridListSetSelectionMode(gr,1) guiGridListAddColumn(gr, "المكان", 0.9) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor( false ) else guiSetVisible ( wnd, true ) showCursor( true ) end end bindKey("F6", "down", OpenWin) for k,v in pairs(Teams) do local row = guiGridListAddRow(gr) guiGridListSetItemText(gr,row,1, k,false,false) guiGridListSetItemData(gr,row,1,{v[1],v[2],v[3]}) end addEventHandler("onClientGUIClick", root, function () local Row = guiGridListGetSelectedItem(gr) if (source == GUIEditor.button[1]) then if (Row ~= -1) then local selected = guiGridListGetItemText(gr, Row, 1) if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == selected then --local x, y, z = unpack(guiGridListGetItemData(gr, Row, 1)) --setElementPosition(localPlayer, x, y, z) addEventHandler("onClientPlayerWasted", localPlayer, spawnOnWasted) guiSetVisible(wnd, false) showCursor(false) guiSetInputEnabled(false) end end end end ) function spawnOnWasted( ) if getPlayerTeam(localPlayer) then local x, y, z = unpack(Teams[getTeamName(getPlayerTeam(localPlayer))]) triggerServerEvent("spawn", localPlayer, x, y, z) removeEventHandler("onClientPlayerWasted", root, spawnOnWasted) end end -- Server Side addEvent ( "spawn", true ) addEventHandler ( "spawn", root, function (x, y, z) setTimer(spawnPlayer, 6000, 1, source, x, y, z) end ) + تأكد انك ضفت حدث الترايقر في السيرفر
-
Teams = { ["Police"] = {1154.412109375, -639.7060546875, 104.15550231934 }; ["Army"] = {1236.359375, -619.701171875, 103.74805450439 }; } GUIEditor = { gridlist = {}, button = {} } wnd = guiCreateWindow(324, 140, 394, 514, "الآنتقالات", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd, false ) GUIEditor.button[1] = guiCreateButton(64, 439, 244, 65, "انتقال", false, wnd) guiSetProperty(GUIEditor.button[1],"NormalTextColour", "FF00FF00") gr = guiCreateGridList(30, 72, 324, 363, false, wnd) guiGridListSetSelectionMode(gr,1) guiGridListAddColumn(gr, "المكان", 0.9) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor( false ) else guiSetVisible ( wnd, true ) showCursor( true ) end end bindKey("F6", "down", OpenWin) for k,v in pairs(Teams) do local row = guiGridListAddRow(gr) guiGridListSetItemText(gr,row,1, k,false,false) guiGridListSetItemData(gr,row,1,{v[1],v[2],v[3]}) end addEventHandler("onClientGUIClick", root, function () local Row = guiGridListGetSelectedItem(gr) if (source == GUIEditor.button[1]) then if (Row ~= -1) then local selected = guiGridListGetItemText(gr, Row, 1) if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == selected then --local x, y, z = unpack(guiGridListGetItemData(gr, Row, 1)) --setElementPosition(localPlayer, x, y, z) addEventHandler("onClientPlayerWasted", root, spawnOnWasted) guiSetVisible(wnd, false) showCursor(false) guiSetInputEnabled(false) end end end end ) function spawnOnWasted( ) if getPlayerTeam(localPlayer) then local x, y, z = unpack(Teams[getTeamName(getPlayerTeam(localPlayer))]) triggerServerEvent("spawn", localPlayer, x, y, z) removeEventHandler("onClientPlayerWasted", root, spawnOnWasted) end end -- Server Side addEvent ( "spawn", true ) addEventHandler ( "spawn", root, function (x, y, z) setTimer(spawnPlayer, 6000, 1, source, x, y, z) end )
-
وضح الي تبيه بالضبط تبيه اذا حدد على تيم وضغط الزر ينقله لاحداثيات التيم اذا مات ؟
-
Teams = { ["Police"] = {1154.412109375, -639.7060546875, 104.15550231934 }; ["Army"] = {1236.359375, -619.701171875, 103.74805450439 }; } GUIEditor = { gridlist = {}, button = {} } wnd = guiCreateWindow(324, 140, 394, 514, "الآنتقالات", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd, false ) GUIEditor.button[1] = guiCreateButton(64, 439, 244, 65, "انتقال", false, wnd) guiSetProperty(GUIEditor.button[1],"NormalTextColour", "FF00FF00") gr = guiCreateGridList(30, 72, 324, 363, false, wnd) guiGridListSetSelectionMode(gr,1) guiGridListAddColumn(gr, "المكان", 0.9) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor( false ) else guiSetVisible ( wnd, true ) showCursor( true ) end end bindKey("F6", "down", OpenWin) for k,v in pairs(Teams) do local row = guiGridListAddRow(gr) guiGridListSetItemText(gr,row,1, k,false,false) guiGridListSetItemData(gr,row,1,{v[1],v[2],v[3]}) end addEventHandler("onClientGUIClick", root, function () local Row = guiGridListGetSelectedItem(gr) if (source == GUIEditor.button[1]) then if (Row ~= -1) then local selected = guiGridListGetItemText(gr, Row, 1) if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == selected then local x, y, z = unpack(guiGridListGetItemData(gr, Row, 1)) setElementPosition(localPlayer, x, y, z) guiSetVisible(wnd, false) showCursor(false) guiSetInputEnabled(false) end end end end ) addEventHandler("onClientPlayerWasted", root, function ( ) if getPlayerTeam(localPlayer) then local x, y, z = unpack(Teams[getTeamName(getPlayerTeam(localPlayer))]) triggerServerEvent("spawn", localPlayer, x, y, z) end end ) -- Server Side addEvent ( "spawn", true ) addEventHandler ( "spawn", root, function (x, y, z) setTimer(spawnPlayer, 6000, 1, source, x, y, z) end )
-
addEventHandler("onClientGUIClick", root, function () local Row = guiGridListGetSelectedItem(gr) if (source == GUIEditor.button[1]) then if (Row ~= -1) then local selected = guiGridListGetItemText(gr, Row, 1) if getPlayerTeam(localPlayer) and getTeamName(getPlayerTeam(localPlayer)) == selected then local x, y, z = unpack(guiGridListGetItemData(gr, Row, 1)) setElementPosition(localPlayer, x, y, z) guiSetVisible(wnd, false) showCursor(false) guiSetInputEnabled(false) end end end end )
-
اذا مات لازم تسوي في السيرفر سباون بلاير spawnPlayer
-
تمام بس كل مافك اف اللوحه واقفلها ثاني يعلق الماوس واشكرك العفو جرب هذا function inputEnabled() if getElementType(source) == "gui-edit" or getElementType(source) == "gui-memo" then if (eventName == "onClientGUIFocus") then guiSetInputMode("no_binds_when_editing") else guiSetInputEnabled(false) end end end addEventHandler("onClientGUIFocus", root, inputEnabled) addEventHandler("onClientGUIBlur", root, inputEnabled)
-
function inputEnabled() if getElementType(source) == "gui-edit" or getElementType(source) == "gui-memo" then if (eventName == "onClientGUIFocus") then guiSetInputEnabled(true) else guiSetInputEnabled(false) end end end addEventHandler("onClientGUIFocus", root, inputEnabled) addEventHandler("onClientGUIBlur", root, inputEnabled) جرب
-
مافي قائمة موجودة فنكشنات تستخدمها مثل الـ gui العادي
-
addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[1] ) then UserName1 = guiGetText ( GUIEditor.edit[1] ) PassWord1 = guiGetText ( GUIEditor.edit[2] ) if ( UserName1 ~= "" and PassWord1 ~= "" ) then triggerServerEvent ( "Register", localPlayer, Username1, Password1 ) guiSetVisible(Window,false) -- Window = اسم اللوحة showCursor(false) outputChatbOX("# تم التسجيل !",0,255,0,true) elseif ( source == GUIEditor.button[2] ) then UserName = guiGetText ( GUIEditor.edit[3] ) -- اسم الأيدت الاول PassWord = guiGetText ( GUIEditor.edit[4] ) -- اسم الأيدت الثاني if ( UserName ~= "" and PassWord ~= "" ) then triggerServerEvent ( "Login", localPlayer, Username, Password ) guiSetVisible(Window,false) -- Window = اسم اللوحة showCursor(false) outputChatbOX("# تم تسجيل الدخول !",0,255,0,true) end end end end ) ليش حاط "تم تسجيل الدخول" و "تم التسجيل" ؟ يعني لو كانت المعلومات خطأ بقوله تم تسجيل الدخول وبتختفي اللوحة !
-
ماله دخل الـ utf-8 local textLen = string.len("Hussain") --> 7 ^ هذا الانجليزي local textLen = string.len("حسين") --> 8 ^ وهذا عربي بتلاحظ الانجليزي يعطينا نفس عدد الأحرف لكن العربي ضعف عدد الأحرف لأن الحروف العربية تاخذ مكان حرفين فإذا بتمسح آخر حرف لازم تعرف المساحة الي ياخذها من النص
-
أنا زيك سويت اديت dx لكن اذ كتبت عربي يبدا يخبص وخليته مايقبل الا انجليزي شكل صاحب المود سوا مثلي >< المشكلة في اختلاف امتداد الحروف انا واجهتني هالمشكلة بس حليتها
-
addEventHandler ( "onClientGUIClick", root, function ( ) if (source == GUIEditor.checkbox[2]) then guiSetEnabled ( GUIEditor.button[1] , guiCheckBoxGetSelected(source)) end end )
-
هذا الحدث مو للأزرار بس + ماحط تحقق اذا ضغطه
-
addEventHandler("onClientGUIClick",root, function() if source == GUIEditor.button[3] then local name = guiGridListGetItemText( GUIEditor.gridlist[1],guiGridListGetSelectedItem(GUIEditor.gridlist[1]),1) if name ~= "" then local playern = getPlayerFromName(tostring(name)) playerb = createBlipAttachedTo(playern,48) setTimer( destroyElement, 3000, 1, playerb ) end end end )
-
تقدر تسوي داتا لكل لاعب بسيرياله أو ترايقرات بس الداتا أفضل
-
تقدر بس لازم أول تفهم طريقة الأكواد
-
getPlayerSerial في الكلنت مافيه ارقمنت اللاعب !