Ahmed Eka Posted September 4, 2016 Share Posted September 4, 2016 سلام عليكم و رحمه الله و بركاته انا عندي مشكله مسوي لابل يجي فيه كم معاي مخدرات بس ما يجي [lua] -- client function setStats ( player, god, speed, lsd, heroin, weed, steroids, mescaline ) if ( source == GUIEditor_Grid[1] ) then row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( source, row, col ) local thePlayer = getPlayerFromName ( playername ) if ( thePlayer ) then guiSetText(lblGod, " God ".. god or 0) guiSetText(lblLSD, " LSD ".. lsd or 0) guiSetText(lblHeroin, " Heroin ".. heroin or 0) guiSetText(lblWeed, " Weed ".. weed or 0) guiSetText(lblSteroids," Steroids".. steroids or 0) guiSetText(lblMescaline, " Mescaline ".. mescaline or 0 ) end end end end addEvent("Drugs:showDrugsGUI", true) addEventHandler("Drugs:showDrugsGUI", localPlayer, setStats) addEventHandler ( "onClientGUIDoubleClick", root, setStats ) [/lua] [lua] --server function showDrugsGUI(thePlayer) local account = getPlayerAccount(thePlayer) if account and not isGuestAccount(account) then local god = getAccountData(account, "god") local speed = getAccountData(account, "speed") local lsd = getAccountData(account, "lsd") local heroin = getAccountData(account, "heroin") local weed = getAccountData(account, "weed") local steroids = getAccountData(account, "steroids") local mescaline = getAccountData(account, "mescaline") triggerClientEvent(thePlayer,"Drugs:showDrugsGUI", thePlayer, god, speed, lsd, heroin, weed, steroids, mescaline) end end [/lua] و شكرا Link to comment
Abdul KariM Posted September 4, 2016 Share Posted September 4, 2016 عليكم السلام يعني لو تضغط على اسم لاعب بالقريد ليست يظهر لك كم معه من مخدرات ي مروج 1 Link to comment
Ahmed Eka Posted September 5, 2016 Author Share Posted September 5, 2016 16 minutes ago, Abdul KariM said: عليكم السلام يعني لو تضغط على اسم لاعب بالقريد ليست يظهر لك كم معه من مخدرات ي مروج هههههههه ياخي انا اقول مشكله انا ادري وش هو الكود انا عندي مشكله عدد المخدرات ما يظهر مدري ليه Link to comment
Abdul KariM Posted September 5, 2016 Share Posted September 5, 2016 ماقلت لي صح كلامي الي فوق ولا لا Link to comment
Ahmed Eka Posted September 5, 2016 Author Share Posted September 5, 2016 25 minutes ago, Abdul KariM said: ماقلت لي صح كلامي الي فوق ولا لا صح بس وين الخطا انا مدري الدي بق ما يقول شي و يجي ان عددهم صفر مدري ليه انا متاكد من اسم الاكونت داتا Link to comment
#kAsR Posted September 5, 2016 Share Posted September 5, 2016 جرب انك تشيل or 0 From Client / 1 Link to comment
N3xT Posted September 5, 2016 Share Posted September 5, 2016 بالكلنت انت حاط القريد ليست سورس جرب عدلها لاسم القريد ليست 1 Link to comment
' A F . Posted September 5, 2016 Share Posted September 5, 2016 ^ مو مشكلة لو حط سورس لان السورس بالحدث الي انظغط عليه دبل كلك وهو مسوي تحقق if ( source === .... ) then 1 Link to comment
!#NssoR_) Posted September 5, 2016 Share Posted September 5, 2016 addEvent("Drugs:showDrugsGUI", true) function setStats ( player, god, speed, lsd, heroin, weed, steroids, mescaline ) if ( source == GUIEditor_Grid[1] ) then local row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if ( row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( GUIEditor_Grid[1], row, col ) local thePlayer = isElement(playername) and getPlayerFromName ( playername ) if ( thePlayer ) then guiSetText(lblGod, " God "..(tostring(god) or 0)) guiSetText(lblLSD, " LSD ".. (tostring(lsd) or 0)) guiSetText(lblHeroin, " Heroin ".. (tostring(heroin) or 0)) guiSetText(lblWeed, " Weed ".. (tostring(weed) or 0)) guiSetText(lblSteroids," Steroids"..(tostring(steroids) or 0)) guiSetText(lblMescaline, " Mescaline "..(tostring(mescaline) or 0 )) end end end end addEventHandler("Drugs:showDrugsGUI", root, setStats) addEventHandler ( "onClientGUIDoubleClick", root, setStats ) جرب الكلنت وبالنسبة لكلام الاخ نكست بعض الاحيان تضبط وبعض الاحيان لا وصارت معي جلست ساعه افكر وش المشكلة واخر شي اكتشفت ان المشكلة من المتغير سورس حق الحدث فالافضل انك تخليها ع اسم القريد ليست وخلاص 3 Link to comment
Ahmed Eka Posted September 5, 2016 Author Share Posted September 5, 2016 53 minutes ago, NssoR said: addEvent("Drugs:showDrugsGUI", true) function setStats ( player, god, speed, lsd, heroin, weed, steroids, mescaline ) if ( source == GUIEditor_Grid[1] ) then local row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if ( row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( GUIEditor_Grid[1], row, col ) local thePlayer = isElement(playername) and getPlayerFromName ( playername ) if ( thePlayer ) then guiSetText(lblGod, " God "..(tostring(god) or 0)) guiSetText(lblLSD, " LSD ".. (tostring(lsd) or 0)) guiSetText(lblHeroin, " Heroin ".. (tostring(heroin) or 0)) guiSetText(lblWeed, " Weed ".. (tostring(weed) or 0)) guiSetText(lblSteroids," Steroids"..(tostring(steroids) or 0)) guiSetText(lblMescaline, " Mescaline "..(tostring(mescaline) or 0 )) end end end end addEventHandler("Drugs:showDrugsGUI", root, setStats) addEventHandler ( "onClientGUIDoubleClick", root, setStats ) جرب الكلنت وبالنسبة لكلام الاخ نكست بعض الاحيان تضبط وبعض الاحيان لا وصارت معي جلست ساعه افكر وش المشكلة واخر شي اكتشفت ان المشكلة من المتغير سورس حق الحدث فالافضل انك تخليها ع اسم القريد ليست وخلاص طيب بجربها شكرا لكم Just now, NssoR said: addEvent("Drugs:showDrugsGUI", true)function setStats ( player, god, speed, lsd, heroin, weed, steroids, mescaline ) if ( source == GUIEditor_Grid[1] ) then local row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if ( row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( GUIEditor_Grid[1], row, col ) local thePlayer = isElement(playername) and getPlayerFromName ( playername ) if ( thePlayer ) then guiSetText(lblGod, " God "..(tostring(god) or 0)) guiSetText(lblLSD, " LSD ".. (tostring(lsd) or 0)) guiSetText(lblHeroin, " Heroin ".. (tostring(heroin) or 0)) guiSetText(lblWeed, " Weed ".. (tostring(weed) or 0)) guiSetText(lblSteroids," Steroids"..(tostring(steroids) or 0)) guiSetText(lblMescaline, " Mescaline "..(tostring(mescaline) or 0 )) end end end end addEventHandler("Drugs:showDrugsGUI", root, setStats) addEventHandler ( "onClientGUIDoubleClick", root, setStats ) جرب الكلنت وبالنسبة لكلام الاخ نكست بعض الاحيان تضبط وبعض الاحيان لا وصارت معي جلست ساعه افكر وش المشكلة واخر شي اكتشفت ان المشكلة من المتغير سورس حق الحدث فالافضل انك تخليها ع اسم القريد ليست وخلاص اخوي .. جربتها طيب بس الحين يجي باللابل اسم المخدرات بعدها nil لما اضغط ع اللاعب الاكواد .. [lua] function setStats ( player, god, speed, lsd, heroin, weed, steroids, mescaline ) if ( source == GUIEditor_Grid[1] ) then row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if ( row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( GUIEditor_Grid[1], row, col ) local thePlayer = getPlayerFromName ( playername ) if ( thePlayer ) then guiSetText(lblGod, " God "..(tostring(god) or 0)) guiSetText(lblLSD, " LSD ".. (tostring(lsd) or 0)) guiSetText(lblHeroin, " Heroin ".. (tostring(heroin) or 0)) guiSetText(lblWeed, " Weed ".. (tostring(weed) or 0)) guiSetText(lblSteroids," Steroids"..(tostring(steroids) or 0)) guiSetText(lblMescaline, " Mescaline "..(tostring(mescaline) or 0 )) end end end end addEvent("Drugs:showDrugsGUI", true) addEventHandler("Drugs:showDrugsGUI", localPlayer, setStats) addEventHandler ( "onClientGUIDoubleClick", root, setStats ) [/lua] 1 Link to comment
Abdul KariM Posted September 5, 2016 Share Posted September 5, 2016 طيب الحين ليه ماتسوي يوم يضغط على القريد ليست مرتين يرسل ترايقر للسيرفر وفي السيرفر سايد فيه ترايقر يرسل للكلينت انت استقبل ترايقر الكلينت وعرف الي ارسلته بالترايقر وحطه في الليبل يعني تاخذ من سطر 8 الى سطر 13 1 Link to comment
Ahmed Eka Posted September 5, 2016 Author Share Posted September 5, 2016 9 minutes ago, Abdul KariM said: طيب الحين ليه ماتسوي يوم يضغط على القريد ليست مرتين يرسل ترايقر للسيرفر وفي السيرفر سايد فيه ترايقر يرسل للكلينت انت استقبل ترايقر الكلينت وعرف الي ارسلته بالترايقر وحطه في الليبل يعني تاخذ من سطر 8 الى سطر 13 جربت ما صار يجي نفس الكلام يجي مكان العدد في اللابل nil 1 Link to comment
iMr ~ MnHmAr Posted September 5, 2016 Share Posted September 5, 2016 جرب شيل or 0 + اذا زبط وش يطلع لك في الدي بوق 1 Link to comment
Ahmed Eka Posted September 5, 2016 Author Share Posted September 5, 2016 (edited) Just now, back!_ said: جرب شيل or 0 + اذا زبط وش يطلع لك في الدي بوق ما ظبط للاسف الاكواد addEvent("Drugs:showDrugsGUI", true) function setStats1 ( player, god, speed, lsd, heroin, weed, steroids, mescaline ) if ( source == GUIEditor_Grid[1] ) then row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( GUIEditor_Grid[1], row, col ) local thePlayer = getPlayerFromName ( playername ) if ( thePlayer ) then guiSetText(lblGod, " God "..(tostring(god))) guiSetText(lblLSD, " LSD ".. (tostring(lsd) or 0)) guiSetText(lblHeroin, " Heroin ".. (tostring(heroin) or 0)) guiSetText(lblWeed, " Weed ".. (tostring(weed) or 0)) guiSetText(lblSteroids," Steroids "..(tostring(steroids) or 0)) guiSetText(lblMescaline, " Mescaline "..(tostring(mescaline) or 0 )) end end end end addEventHandler("Drugs:showDrugsGUI", localPlayer, setStats1) addEventHandler ( "onClientGUIDoubleClick", root, setStats1 ) Edited September 5, 2016 by M[A]X 1 Link to comment
Ahmed Eka Posted September 5, 2016 Author Share Posted September 5, 2016 ياخي ليه ما تساعدوني 1 Link to comment
Abdul KariM Posted September 5, 2016 Share Posted September 5, 2016 سويها بالشكل الي قلت لك عليه واذا ماضبط اطرح اكوادك والمخدرات كيف حطيتها المنت داتا ؟ لاني شاك انها المنت داتا Link to comment
Ahmed Eka Posted September 5, 2016 Author Share Posted September 5, 2016 2 hours ago, Abdul KariM said: سويها بالشكل الي قلت لك عليه واذا ماضبط اطرح اكوادك والمخدرات كيف حطيتها المنت داتا ؟ لاني شاك انها المنت داتا سويت و ما ظبط المخدرات اكونت داتا.. لو المنت داتا كنت حطتها كلينت و خلصت Link to comment
N3xT Posted September 5, 2016 Share Posted September 5, 2016 ممكن يعطيك القيمة نيل عشانك ما حطيت داتا ع حساب اللاعب أصلا ؟ Link to comment
Abdul KariM Posted September 5, 2016 Share Posted September 5, 2016 مشكلتك غريبة سويت لك مثال يطلع الي مخزن بالاكونت داتا addCommandHandler ( "gMe" , function ( player ) local playerAcc = getPlayerAccount ( player ) if ( playerAcc ) and not ( isGuestAccount ( playerAcc ) ) then local god = getAccountData(playerAcc, "god") local speed = getAccountData(playerAcc, "speed") local lsd = getAccountData(playerAcc, "lsd") local heroin = getAccountData(playerAcc, "heroin") local weed = getAccountData(playerAcc, "weed") local steroids = getAccountData(playerAcc, "steroids") local mescaline = getAccountData(playerAcc, "mescaline") outputChatBox ( tostring ( god ) .. " " .. tostring ( speed ) .. " " .. tostring ( lsd ) , player , 255 , 255 , 255 , false ) outputChatBox ( tostring ( heroin ) .. " " .. tostring ( weed ) .. " " .. tostring ( steroids ) .. " " .. tostring ( mescaline ) , player , 255 , 255 , 255 , false ) end end ) ; اكتب باف8 gMe وشوف وش يطلع لك بالشات Link to comment
Ahmed Eka Posted September 5, 2016 Author Share Posted September 5, 2016 Just now, N3xT said: ممكن يعطيك القيمة نيل عشانك ما حطيت داتا ع حساب اللاعب أصلا ؟ كيف يعني ممكن توضح اكتر ؟ Just now, Abdul KariM said: مشكلتك غريبة سويت لك مثال يطلع الي مخزن بالاكونت داتا addCommandHandler ( "gMe" , function ( player ) local playerAcc = getPlayerAccount ( player ) if ( playerAcc ) and not ( isGuestAccount ( playerAcc ) ) then local god = getAccountData(playerAcc, "god") local speed = getAccountData(playerAcc, "speed") local lsd = getAccountData(playerAcc, "lsd") local heroin = getAccountData(playerAcc, "heroin") local weed = getAccountData(playerAcc, "weed") local steroids = getAccountData(playerAcc, "steroids") local mescaline = getAccountData(playerAcc, "mescaline") outputChatBox ( tostring ( god ) .. " " .. tostring ( speed ) .. " " .. tostring ( lsd ) , player , 255 , 255 , 255 , false ) outputChatBox ( tostring ( heroin ) .. " " .. tostring ( weed ) .. " " .. tostring ( steroids ) .. " " .. tostring ( mescaline ) , player , 255 , 255 , 255 , false ) end end ) ; اكتب باف8 gMe وشوف وش يطلع لك بالشات ظبطت ياخوي جاني المخدرات اعدادها .. الحين انا ابي اسوي ترايقر عشان تظهر باللابل وش اسوي ؟ Link to comment
Abdul KariM Posted September 5, 2016 Share Posted September 5, 2016 سوي الطريقة الي قلت لك عليها فوق 7 hours ago, Abdul KariM said: طيب الحين ليه ماتسوي يوم يضغط على القريد ليست مرتين يرسل ترايقر للسيرفر وفي السيرفر سايد فيه ترايقر يرسل للكلينت انت استقبل ترايقر الكلينت وعرف الي ارسلته بالترايقر Link to comment
Ahmed Eka Posted September 5, 2016 Author Share Posted September 5, 2016 سويت و مدري وين الخطا client -- function setStats ( player, god, speed, lsd, heroin, weed, steroids, mescaline ) if ( source == GUIEditor_Grid[1] ) then row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( GUIEditor_Grid[1], row, col ) local thePlayer = getPlayerFromName ( playername ) if ( thePlayer ) then guiSetText(lblGod, " God "..(tostring(god))) guiSetText(lblLSD, " LSD ".. (tostring(lsd) or 0)) guiSetText(lblHeroin, " Heroin ".. (tostring(heroin) or 0)) guiSetText(lblWeed, " Weed ".. (tostring(weed) or 0)) guiSetText(lblSteroids," Steroids "..(tostring(steroids) or 0)) guiSetText(lblMescaline, " Mescaline "..(tostring(mescaline) or 0 )) end end end end end addEvent("Drugs:showDrugsGUI", true) addEventHandler("Drugs:showDrugsGUI", localPlayer, setStats) addEventHandler ( "onClientGUIDoubleClick", root, setStats ) -- server function showDrugsGUI( thePlayer ) local playerAcc = getPlayerAccount ( player ) if ( playerAcc ) and not ( isGuestAccount ( playerAcc ) ) then triggerClientEvent ( thePlayer, "Drugs:showDrugsGUI", thePlayer, ) local god = getAccountData(playerAcc, "god") local speed = getAccountData(playerAcc, "speed") local lsd = getAccountData(playerAcc, "lsd") local heroin = getAccountData(playerAcc, "heroin") local weed = getAccountData(playerAcc, "weed") local steroids = getAccountData(playerAcc, "steroids") local mescaline = getAccountData(playerAcc, "mescaline") end end addEvent("Drugs:showDrugsGUI", true) addEventHandler("Drugs:showDrugsGUI", localPlayer, showDrugsGUI) Link to comment
Ahmed Eka Posted September 5, 2016 Author Share Posted September 5, 2016 Just now, Abdul KariM said: تمزح صح ؟ ؟؟ وش ؟ انت قلت لي سوي ترايقر سويت و ماشتغل Link to comment
Abdul KariM Posted September 5, 2016 Share Posted September 5, 2016 Client : addEventHandler ( "onClientGUIDoubleClick", root, function ( ) if ( source == GUIEditor_Grid[1] ) then local row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if ( row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( GUIEditor_Grid[1], row, col ) local thePlayer = getPlayerFromName ( playername ) if ( thePlayer ) then triggerServerEvent ( "ShowInf" , localPlayer , thePlayer ) end end end end ) ; addEvent ( "SetInf" , true ) addEventHandler ( "SetInf" , root , function ( god, speed, lsd, heroin, weed, steroids, mescaline ) guiSetText ( lblGod, " God "..god ) guiSetText ( lblLSD, " LSD ".. lsd ) guiSetText ( lblHeroin, " Heroin ".. heroin ) guiSetText ( lblWeed, " Weed ".. weed ) guiSetText ( lblSteroids," Steroids"..steroids ) guiSetText ( lblMescaline, " Mescaline "..mescaline ) end ) Server : addEvent ( "ShowInf" , true ) addEventHandler ( "ShowInf" , root , function ( player_ ) local playerAcc = getPlayerAccount ( player_ ) if ( playerAcc ) and not ( isGuestAccount ( playerAcc ) ) then local god = getAccountData(playerAcc, "god") local speed = getAccountData(playerAcc, "speed") local lsd = getAccountData(playerAcc, "lsd") local heroin = getAccountData(playerAcc, "heroin") local weed = getAccountData(playerAcc, "weed") local steroids = getAccountData(playerAcc, "steroids") local mescaline = getAccountData(playerAcc, "mescaline") triggerClientEvent ( source , "SetInf" , source , tostring ( god ) , tostring ( speed ) , tostring ( lsd ) , tostring ( heroin ) , tostring ( weed ) , tostring ( steroids ) , tostring ( mescaline ) ) end end ) بالتوفيق ان شاء الله 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