3DNAN_! Posted August 3, 2017 Share Posted August 3, 2017 السلام عليكم أنا عايز اتعلم اني اسوي بالجريد لست تظهر أسماء الاعبين وكمان لما اختار لاعب مثلا من الجريد لست وادوس علي زر قتل بدل ما اقتل نفسي اقتل الشخص اللي انا محدده بالجريد لست ارجو الرد Link to comment
|M.r|LooFe| Posted August 4, 2017 Share Posted August 4, 2017 4 hours ago, 3DNAN_! said: السلام عليكم أنا عايز اتعلم اني اسوي بالجريد لست تظهر أسماء الاعبين وكمان لما اختار لاعب مثلا من الجريد لست وادوس علي زر قتل بدل ما اقتل نفسي اقتل الشخص اللي انا محدده بالجريد لست ارجو الرد كود اظهار اسماء اللاعبين -- كلينت function putAllPlayersInList() guiGridListClear(grid) for i,v in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,getPlayerName(v),false,false) guiGridListSetItemColor(grid,row,1,0,255,0) end end -- يجب ان تضع الكود هذاputAllPlayersInList()في كود فتح اللوحة كود القتل تختار من القريد ليست -- كلينت addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) local text = guiGridListGetItemText(grid,sel,1) elseif ( source == GUIEditor_Button[1] ) then if ( sel ~= -1 ) then guiSetEnabled(GUIEditor_Button[1],false) setTimer(guiSetEnabled,1000,1,GUIEditor_Button[1],true) triggerServerEvent("killPlayer",localPlayer,text) else show("Please Choose Player To Kill it") end end end ) -- سيرفر addEvent("killPlayer",true) addEventHandler("killPlayer",root, function (player) local player = getPlayerFromName(player) if ( player ) then killPed(player) outputChatBox("[POLICE] : " .. getPlayerName(player) .. " Has Been Killed By " .. getPlayerName(source),root,255,0,0) end end ) Link to comment
Rockyz Posted August 4, 2017 Share Posted August 4, 2017 4 minutes ago, |M.r|LooFe| said: كود اظهار اسماء اللاعبين -- كلينت function putAllPlayersInList() guiGridListClear(grid) for i,v in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,getPlayerName(v),false,false) guiGridListSetItemColor(grid,row,1,0,255,0) end end -- يجب ان تضع الكود هذاputAllPlayersInList()في كود فتح اللوحة كود القتل تختار من القريد ليست -- كلينت addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) local text = guiGridListGetItemText(grid,sel,1) elseif ( source == GUIEditor_Button[1] ) then if ( sel ~= -1 ) then guiSetEnabled(GUIEditor_Button[1],false) setTimer(guiSetEnabled,1000,1,GUIEditor_Button[1],true) triggerServerEvent("killPlayer",localPlayer,text) else show("Please Choose Player To Kill it") end end end ) -- سيرفر addEvent("killPlayer",true) addEventHandler("killPlayer",root, function (player) local player = getPlayerFromName(player) if ( player ) then killPed(player) outputChatBox("[POLICE] : " .. getPlayerName(player) .. " Has Been Killed By " .. getPlayerName(source),root,255,0,0) end end ) وش تخربط انت ؟ Link to comment
A7M8D Posted August 4, 2017 Share Posted August 4, 2017 show("Please Choose Player To Kill it") ! function (player) player فين تعريف Link to comment
Rockyz Posted August 4, 2017 Share Posted August 4, 2017 5 minutes ago, #MR.NaiF said: ! function (player) player فين تعريف ^ local text = guiGridListGetItemText(grid,sel,1) triggerServerEvent("killPlayer",localPlayer,text) Link to comment
Rockyz Posted August 4, 2017 Share Posted August 4, 2017 (edited) 18 minutes ago, #MR.NaiF said: ايوا فين التعريف يعني ؟ text = التعريف 3 hours ago, |M.r|LooFe| said: كود اظهار اسماء اللاعبين -- كلينت function putAllPlayersInList() guiGridListClear(grid) for i,v in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,getPlayerName(v),false,false) guiGridListSetItemColor(grid,row,1,0,255,0) end end -- يجب ان تضع الكود هذاputAllPlayersInList()في كود فتح اللوحة كود القتل تختار من القريد ليست -- كلينت addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) local text = guiGridListGetItemText(grid,sel,1) elseif ( source == GUIEditor_Button[1] ) then if ( sel ~= -1 ) then guiSetEnabled(GUIEditor_Button[1],false) setTimer(guiSetEnabled,1000,1,GUIEditor_Button[1],true) triggerServerEvent("killPlayer",localPlayer,text) else show("Please Choose Player To Kill it") end end end ) -- سيرفر addEvent("killPlayer",true) addEventHandler("killPlayer",root, function (player) local player = getPlayerFromName(player) if ( player ) then killPed(player) outputChatBox("[POLICE] : " .. getPlayerName(player) .. " Has Been Killed By " .. getPlayerName(source),root,255,0,0) end end ) بالنسبة الى اكوادك تصير كذا : -- #Client Side : gridList = grid -- اسم القريد ليست حقك buttonz = btn -- اسم الزر حقك addEventHandler ( 'onClientResourceStart', resourceRoot, function ( ) Refresh ( ) end ) function Refresh ( ) guiGridListClear ( gridList ) for i, v in ipairs ( getElementsByType ( 'player' ) ) do local Row = guiGridListAddRow ( gridList ) guiGridListSetItemText ( gridList, Row, 1, tostring ( getPlayerName ( v ) ), false, false ) guiGridListSetItemColor ( gridList, Row, 1, 0, 255, 0 ) end end addEventHandler ( "onClientGUIClick", root, function ( ) elseif ( source == btn ) then local sel = guiGridListGetSelectedItem ( gridList ) if ( sel ~= -1 ) then local text = guiGridListGetItemText ( gridList, sel, 1 ) guiSetEnabled ( btn, false ) setTimer ( guiSetEnabled, 1000, 1, btn, true ) triggerServerEvent ( "killPlayer", getPlayerFromName ( text ), localPlayer ) else outputChatBox ( "Please Choose Player To Kill it", 255, 0, 0, true ) end end ) -- #Server Side : addEvent ( "killPlayer", true ) addEventHandler ( "killPlayer", root, function ( plrkilled ) outputChatBox ( 'The Player ' .. getPlayerName ( plrkilled ) .. ' Has Killed You', 255, 0, 0, true ) killPed ( source ) end ) Edited August 4, 2017 by #,+( _xiRoc[K]; > Link to comment
iMr.WiFi..! Posted August 4, 2017 Share Posted August 4, 2017 27 minutes ago, #,+( _xiRoc[K]; > said: text = التعريف بالنسبة الى اكوادك تصير كذا : -- #Client Side : gridList = grid -- اسم القريد ليست حقك buttonz = btn -- اسم الزر حقك addEventHandler ( 'onClientResourceStart', resourceRoot, function ( ) Refresh ( ) end ) function Refresh ( ) guiGridListClear ( gridList ) for i, v in ipairs ( getElementsByType ( 'player' ) ) do local Row = guiGridListAddRow ( gridList ) guiGridListSetItemText ( gridList, Row, 1, tostring ( getPlayerName ( v ) ), false, false ) guiGridListSetItemColor ( gridList, Row, 1, 0, 255, 0 ) end end addEventHandler ( "onClientGUIClick", root, function ( ) elseif ( source == btn ) then local sel = guiGridListGetSelectedItem ( gridList ) if ( sel ~= -1 ) then local text = guiGridListGetItemText ( gridList, sel, 1 ) guiSetEnabled ( btn, false ) setTimer ( guiSetEnabled, 1000, 1, btn, true ) triggerServerEvent ( "killPlayer", getPlayerFromName ( text ), localPlayer ) else outputChatBox ( "Please Choose Player To Kill it", 255, 0, 0, true ) end end ) -- #Server Side : addEvent ( "killPlayer", true ) addEventHandler ( "killPlayer", root, function ( plrkilled ) outputChatBox ( 'The Player ' .. getPlayerName ( plrkilled ) .. ' Has Killed You', 255, 0, 0, true ) killPed ( source ) end ) سطر 19 , حط if و 23 و 24 غير التعريف من btn الى buttonz Link to comment
Rockyz Posted August 4, 2017 Share Posted August 4, 2017 (edited) 3 minutes ago, iMr.WiFi..! said: سطر 19 , حط if و 23 و 24 غير التعريف من btn الى buttonz اوه صح مانتبهت نسخت الكود من عنده ولا عدلت خخخ نسيت تقولي اغير سطر 19 التعريف الكود يصير كذا : -- #Client Side : gridList = grid -- اسم القريد ليست حقك buttonz = btn -- اسم الزر حقك addEventHandler ( 'onClientResourceStart', resourceRoot, function ( ) Refresh ( ) end ) function Refresh ( ) guiGridListClear ( gridList ) for i, v in ipairs ( getElementsByType ( 'player' ) ) do local Row = guiGridListAddRow ( gridList ) guiGridListSetItemText ( gridList, Row, 1, tostring ( getPlayerName ( v ) ), false, false ) guiGridListSetItemColor ( gridList, Row, 1, 0, 255, 0 ) end end addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == buttonz ) then local sel = guiGridListGetSelectedItem ( gridList ) if ( sel ~= -1 ) then local text = guiGridListGetItemText ( gridList, sel, 1 ) guiSetEnabled ( buttonz, false ) setTimer ( guiSetEnabled, 1000, 1, buttonz, true ) triggerServerEvent ( "killPlayer", getPlayerFromName ( text ), localPlayer ) else outputChatBox ( "Please Choose Player To Kill it", 255, 0, 0, true ) end end end ) -- #Server Side : addEvent ( "killPlayer", true ) addEventHandler ( "killPlayer", root, function ( plrkilled ) outputChatBox ( 'The Player ' .. getPlayerName ( plrkilled ) .. ' Has Killed You', 255, 0, 0, true ) killPed ( source ) end ) Edited August 4, 2017 by #,+( _xiRoc[K]; > Link to comment
3DNAN_! Posted August 4, 2017 Author Share Posted August 4, 2017 طيب شباب الكود تمام ياريت كود فتح اللوحه مثلا بإف 1 لاكن لرتب معينه محاولتي client ------ addEvent("open",true) addEventHandler("open",root, function() if guiGetVisible(GUIEditor.window[1]) then guiSetVisible( GUIEditor.window[1], false ) showCursor(false) else guiSetVisible( GUIEditor.window[1], true ) showCursor(true) end end ) server ------ function opens (player) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName,aclGetGroup("Console"))then triggerClientEvent(player,"open",player) else outputChatBox("you are not admin",root,0,0,0,true) end end bindKey( "f2", "down", opens ) بس ما تنجح يقولي ان في خطأ في السطر حق bindKey( "f2", "down", opens ) تقريبا او فيما معناه قصده علي "f2" Link to comment
A7M8D Posted August 5, 2017 Share Posted August 5, 2017 @#,+( _xiRoc[K]; > حبيبي قصدي لو triggerServerEvent("killPlayer",localPlayer,text) function(text) فوق بلاير اتمني تكون فهمتني Link to comment
Rockyz Posted August 5, 2017 Share Posted August 5, 2017 (edited) 3 hours ago, #MR.NaiF said: @#,+( _xiRoc[K]; > حبيبي قصدي لو triggerServerEvent("killPlayer",localPlayer,text) function(text) فوق بلاير اتمني تكون فهمتني ههههه ترا مو لازم نفس الاسم لعلمك اهم شي ان استقبل التريقر وانت جرب قبل لاتقول لازم نفس الشي Edited August 5, 2017 by #,+( _xiRoc[K]; > Link to comment
|M.r|LooFe| Posted August 5, 2017 Share Posted August 5, 2017 عيال الكود يلي طرحته شغال معي 100% Link to comment
+Source|> Posted August 5, 2017 Share Posted August 5, 2017 10 hours ago, 3DNAN_! said: طيب شباب الكود تمام ياريت كود فتح اللوحه مثلا بإف 1 لاكن لرتب معينه محاولتي client ------ addEvent("open",true) addEventHandler("open",root, function() if guiGetVisible(GUIEditor.window[1]) then guiSetVisible( GUIEditor.window[1], false ) showCursor(false) else guiSetVisible( GUIEditor.window[1], true ) showCursor(true) end end ) server ------ function opens (player) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName,aclGetGroup("Console"))then triggerClientEvent(player,"open",player) else outputChatBox("you are not admin",root,0,0,0,true) end end bindKey( "f2", "down", opens ) بس ما تنجح يقولي ان في خطأ في السطر حق bindKey( "f2", "down", opens ) تقريبا او فيما معناه قصده علي "f2" bindKey صيغتها غلط بملف سيرفر كذا Link to comment
3DNAN_! Posted August 5, 2017 Author Share Posted August 5, 2017 يعني لو حطتها كلينت اقدر اشغلها ؟ Link to comment
Rockyz Posted August 5, 2017 Share Posted August 5, 2017 7 minutes ago, 3DNAN_! said: يعني لو حطتها كلينت اقدر اشغلها ؟ جرب كودي Link to comment
3DNAN_! Posted August 5, 2017 Author Share Posted August 5, 2017 انا ما اتلكم عن كود اظار اسماء الاعبين اتكلم عن كود اظهار اللوحه لرتب معينه Link to comment
+Source|> Posted August 5, 2017 Share Posted August 5, 2017 4 hours ago, 3DNAN_! said: انا ما اتلكم عن كود اظار اسماء الاعبين اتكلم عن كود اظهار اللوحه لرتب معينه انا عطيتك الكود من قبل Link to comment
AliAlanzi Posted August 5, 2017 Share Posted August 5, 2017 5 hours ago, 3DNAN_! said: انا ما اتلكم عن كود اظار اسماء الاعبين اتكلم عن كود اظهار اللوحه لرتب معينه aclGet AclGetName مدري اذا صح جرب Link to comment
Ahmed Ly Posted August 5, 2017 Share Posted August 5, 2017 --Client key = "F3" bindKey(key,"down", function () triggerServerEvent("onPlayerOpenPanel",localPlayer) end ) addEvent("open",true) addEventHandler("open",root, function () if guiGetVisible (Window ) == false then guiSetVisible (Window,true) showCursor(true) playSoundFrontEnd(20) else guiSetVisible (Window,false) showCursor(false) end end ) --Server addEvent("onPlayerOpenPanel",true) addEventHandler("onPlayerOpenPanel",root, function () acc = getPlayerAccount(source) if not isGuestAccount(acc) then if isObjectInACLGroup( "user.".. getAccountName(acc),aclGetGroup ( "Admin" ) ) then triggerClientEvent(source,"open",source) end end end ) Link to comment
3DNAN_! Posted August 6, 2017 Author Share Posted August 6, 2017 طيب عايز كمان اكواد اخري مثل انا مثلا مسوي لوحه فيها جريد لست وايديت بوكس وزر ابي لما اكتب اسم داخل الاديت واضغط الزر يضيف للجريد لست الاسم اللي ضفته بالاديت بوكس ويحفظ إحداثي المكان ولما احدد المكان من الجريد وانتقل له ينتقل ولما اخرج واخل يحفظ الاماكن علي الحساب 1 Link to comment
Ahmed Ly Posted August 7, 2017 Share Posted August 7, 2017 "onClientGUIClick" guiGetText guiGridListAddRow guiGridListSetItemText triggerServerEvent executeSQLQuery setElementPosition triggerClientEvent 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