Mr.Mostafa Posted June 11, 2018 Share Posted June 11, 2018 سلام عليكم ابي تصحيح لدي ابي لما اختار لاعب من قريد ليست واضغط زر يعطي سلاب للي اختارته --client addEventHandler("onClientGUIClick",root, function () if source == aAdminButtonTO then local playerSlaper = guiGridListGetItemText ( aTab1.PlayerList, guiGridListGetSelectedItem ( aTab1.PlayerList ), 1 ) triggerServerEvent("Admin:SlapPlayerNow", localPlayer, playerSlaper) end end ) -- #server addEvent("Admin:SlapPlayerNow", true) addEventHandler("Admin:SlapPlayerNow", root, function(playerSlaper) killPed ( playerSlaper, playerSlaper ) end) Link to comment
Doffy Posted June 11, 2018 Share Posted June 11, 2018 --client addEventHandler("onClientGUIClick",root, function () if source == aAdminButtonTO then local playerSlaper = guiGridListGetItemText ( aTab1.PlayerList, guiGridListGetSelectedItem ( aTab1.PlayerList ), 1 ) triggerServerEvent("Admin:SlapPlayerNow", localPlayer, playerSlaper) end end ) -- #server addEvent("Admin:SlapPlayerNow", true) addEventHandler("Admin:SlapPlayerNow", root, function(playerSlaper) local plr = getPlayerFromName(playerSlaper) killPed ( plr, plr ) end) Link to comment
SycroX Posted June 12, 2018 Share Posted June 12, 2018 كود هيمو صح | بس انا ضفت له بعض التحققات عشان ما يطلع لك دي بق مثلا لاعب خرج و انت جيت تصكه بيطلع لك انه قيمه اللاعب نيل او غير اسمه الخ يعني .. --client addEventHandler("onClientGUIClick", root, function () if source == aAdminButtonTO then local selectedRow = guiGridListGetSelectedItem(aTab1.PlayerList) if selectedRow and selectedRow ~= -1 then local selectedPlayerName = guiGridListGetItemText(aTab1.PlayerList, selectedRow, 1) triggerServerEvent("Admin:SlapPlayerNow", localPlayer, selectedPlayerName) end end end ) -- #server addEvent("Admin:SlapPlayerNow", true) addEventHandler("Admin:SlapPlayerNow", root, function(selectedPlayerName) local player = getPlayerFromName(selectedPlayerName) if player and isElement(player) then if not isPedDead(player) then killPed(player, player) end end end ) Link to comment
Rockyz Posted June 12, 2018 Share Posted June 12, 2018 (edited) 10 minutes ago, #x1AhMeD,-09 said: كود هيمو صح | بس انا ضفت له بعض التحققات عشان ما يطلع لك دي بق مثلا لاعب خرج و انت جيت تصكه بيطلع لك انه قيمه اللاعب نيل او غير اسمه الخ يعني .. --client addEventHandler("onClientGUIClick", root, function () if source == aAdminButtonTO then local selectedRow = guiGridListGetSelectedItem(aTab1.PlayerList) if selectedRow and selectedRow ~= -1 then local selectedPlayerName = guiGridListGetItemText(aTab1.PlayerList, selectedRow, 1) triggerServerEvent("Admin:SlapPlayerNow", localPlayer, selectedPlayerName) end end end ) -- #server addEvent("Admin:SlapPlayerNow", true) addEventHandler("Admin:SlapPlayerNow", root, function(selectedPlayerName) local player = getPlayerFromName(selectedPlayerName) if player and isElement(player) then if not isPedDead(player) then killPed(player, player) end end end ) killPed(player, client); كودك مو خطأ بس يفضل تخليه كذا لمعرفة القاتل Edited June 12, 2018 by #,+( _xiRoc[K]; > 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