SaedAmer Posted June 10, 2016 Share Posted June 10, 2016 السلام عليكم عاوز الكود ده يجيب ديرفت بس dxDrawText(string.format("#ffffff*( #FF4000Best Drift #ffffff)*:#ffffff %s : %d Player),global_nombre,global_mejor),40,screenHeight-29,screenWidth,screenHeight,Blue,1,myFont,"left","top",false,false,false,true) ------------------------ الكود ده مب حقي بس عاوزه لما احدد علي شخص في جريد لست و اكتب في ايدت الفلوس و ايدت تاني السبب يتبعتلو الفلوس و يظهر لكل الناس اني بعت للشخص ده فلوس و السببب كلنت addEventHandler("onClientGUIClick",root, function() if ( source == GUIEditor.button[1] ) then local playerName = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) local amount = guiGetText(GUIEditor.edit[1]) triggerServerEvent("Floos",localPlayer,amount,playerName) end end ) سيرفر addEvent("Floos", true) addEventHandler("Floos", root, function( amount,plr ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Console")) then local toWho = getPlayerFromName(plr) local player = getPlayerName(toWho) local name = getPlayerName(source) local Money = getPlayerMoney(source) if Money == 0 then return end if tonumber(amount) then takePlayerMoney(source,tonumber(amount)) givePlayerMoney(toWho,amount) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 You Has Give #ffff00( " .. player .. " #00ff00$#ffff00 ) Money ", source, 0, 150, 255, true) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 *".. name .. " #ff0000Has Given you #FFFF00( " .. player .. " #00ff00$#ffff00 ) Money #ff0000 !", toWho, 255, 0, 0, true) else outputChatBox("#ff0000*#ffff00[Admin]#ff0000 Please Select Player!!", source, 255, 0, 0, true) end end end ) Link to comment
Ahmed Ly Posted June 10, 2016 Share Posted June 10, 2016 ---كلنت addEvent("Floos", true) addEventHandler("Floos", root, function( amount,playerName ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Console")) then local toWho = getPlayerFromName(playerName) local player = getPlayerName(toWho) local name = getPlayerName(source) local Money = getPlayerMoney(source) if Money == 0 then return end if tonumber(amount) then takePlayerMoney(source,tonumber(amount)) givePlayerMoney(toWho,amount) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 You Has Give #ffff00( " .. player .. " #00ff00$#ffff00 ) Money ", root, 0, 150, 255, true) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 *".. name .. " #ff0000Has Given you #FFFF00( " .. player .. " #00ff00$#ffff00 ) Money #ff0000 !", root, 255, 0, 0, true) else outputChatBox("#ff0000*#ffff00[Admin]#ff0000 Please Select Player!!", source, 255, 0, 0, true) end end end ) --- سيرفر addEventHandler("onClientGUIClick",root, function() if ( source == GUIEditor.button[1] ) then local playerName = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) local amount = guiGetText(GUIEditor.edit[1]) triggerServerEvent("Floos",localPlayer,amount,playerName) end end ) Link to comment
Ahmed Ly Posted June 10, 2016 Share Posted June 10, 2016 addEvent("Floos", true) addEventHandler("Floos", root, function( amount,playerName ) local name = getPlayerName(source) local Money = getPlayerMoney(source) local player1 = getPlayerName(playerName) if Money == 0 then outputChatBox("ليس لديك المال الكافي",source,0,255,0)return end takePlayerMoney(source,amount) givePlayerMoney(playerName,amount) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 You Has Give #ffff00( " .. player1 .. " #00ff00$#ffff00 ) Money ", root, 0, 150, 255, true) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 *".. name .. " #ff0000Has Given you #FFFF00( " .. player1 .. " #00ff00$#ffff00 ) Money #ff0000 !", root, 255, 0, 0, true) end ) --- سيرفر addEventHandler("onClientGUIClick",root, function() if ( source == GUIEditor.button[1] ) then local plr = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) local amount = guiGetText(GUIEditor.edit[1]) local playerName = getPlayerFromName(plr) triggerServerEvent("Floos",localPlayer,amount,playerName) end end ) Link to comment
iMr.SFA7 Posted June 10, 2016 Share Posted June 10, 2016 أنت تقول أنك سويت اديت للسبب لاكني ما أشوف أنك جبت التكست الي بالاديت حق السبب أعتقد أنك تبيه خاص للكونسل وهذا السبب الي مخليك تتحقق من أنه بقروب الكونسل بس دامه بقروب الكونسل ليه تبي تشيل من الكونسل الفلوس ولا أنت تبيه كذا Link to comment
SaedAmer Posted June 10, 2016 Author Share Posted June 10, 2016 الكود مب حقي الي انا عاوزو هي لوحة كونسول مثلا يوزع لشخص في الجريد بعد ما يحددو يكتب في ايدت الفلوس و ايدت سبب اعطأئه الفلوس بس Link to comment
iMr.SFA7 Posted June 10, 2016 Share Posted June 10, 2016 addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[1] then local playerName = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) local amount = guiGetText(GUIEditor.edit[1]) local _reason = guiGetText(reasonEdit) if amount == '' or amount == ' ' or _reason == '' or _reason == ' ' or not tonumber(amount) then return end; triggerServerEvent("Floos", localPlayer, amount, playerName, _reason) end end) 1. تأكد من متغير الزر 2. تأكد من متغير القريد ليست وتأكد من أن أسماء اللاعبين موجودة في الكولمن الأول 3. تأكد من متغير الاديت الخاص بعدد الفلوس 4. بمتغير الاديت الخاص بالسبب reasonEdit قم بتبديل addEvent("Floos", true) addEventHandler("Floos", root, function(amount, plr, reason) if getPlayerAccount(source) and not isGuestAccount(getPlayerAccount(source)) and tonumber(amount) and reason then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Console")) then local toWho = getPlayerFromName(plr) if toWho then local player = getPlayerName(toWho) local name = getPlayerName(source) local Money = getPlayerMoney(source) if Money == 0 then return end --takePlayerMoney(source,tonumber(amount)) givePlayerMoney(toWho,tonumber(amount)) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 You Has Give #ffff00( " .. player .. " #00ff00$#ffff00 ) Money: "..tonumber(amount).." Reason: "..reason.."", source, 0, 150, 255, true) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 *".. name .. " #ff0000Has Given you #FFFF00( " .. player .. " #00ff00$#ffff00 ) Money: "..tonumber(amount).." Reason: "..reason.." #ff0000 !", toWho, 255, 0, 0, true) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 *".. name .. " #ff0000player he gave the player #FFFF00( " .. player .. " #00ff00$#ffff00 ) Money: "..tonumber(amount).." Reason: "..reason.." #ff0000 !", root, 255, 0, 0, true) else outputChatBox("#ff0000*#ffff00[Admin]#ff0000 Please Select Player!!", source, 255, 0, 0, true) end end end end) Link to comment
iMr.WiFi..! Posted June 10, 2016 Share Posted June 10, 2016 (edited) هذا الكود شفته مليون مره شكلي لازم احفظه عشان الي يبيه تفضل كود اخر addEventHandler("onClientGUIClick",root, function() if ( source == GUIEditor.button[1] ) then local playerName = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) local amount = guiGetText(GUIEditor.edit[1]) if amount ~= " " then triggerServerEvent("Floos",localPlayer,playerName,amount) end end ) addEvent("Floos",true) addEventHandler("Floos",root,function ( Plr , Amm ) local Player = getPlayerFromName(Plr) if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Console")) then return end if getPlayerMoney(source) =< Amm then return outputChatBox("ليس لديك المال الكافي ",source,255,0,0,true) end if not tonumber(Amm) then return outputChatBox("الخانة ليست ارقاماً",source,255,0,0,true) end takePlayerMoney(source,tonumber(Amm)) givePlayerMoney(Player,tonumber(Amm)) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 You Has Give #ffff00( " .. Player .. " #00ff00$#ffff00 ) Money ", source, 0, 150, 255, true) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 *".. getPlayerName(source) .. " #ff0000Has Given you #FFFF00( " .. Player .. " #00ff00$#ffff00 ) Money #ff0000 !", Player, 255, 0, 0, true) end ) Edited June 11, 2016 by Guest Link to comment
فاّرس Posted June 11, 2016 Share Posted June 11, 2016 هذا الكود شفته مليون مره شكلي لازم احفظه عشان الي يبيه تفضل كود اخر addEventHandler("onClientGUIClick",root, function() if ( source == GUIEditor.button[1] ) then local playerName = guiGridListGetItemText ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1 ) local amount = guiGetText(GUIEditor.edit[1]) if amount ~= " " then triggerServerEvent("Floos",localPlayer,playerName,amount) end end ) addEvent("Floos",true) addEventHandler("Floos",root,function ( Plr , Amm ) local Player = getPlayerFromName(Plr) if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Console")) then return end if getPlayeMoney(source) =< Amm then return outputChatBox("ليس لديك المال الكافي ",source,255,0,0,true) end if not tonumber(Amm) then return outputChatBox("الخانة ليست ارقاماً",source,255,0,0,true) end takePlayerMoney(source,tonumber(Amm)) givePlayerMoney(Player,tonumber(Amm)) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 You Has Give #ffff00( " .. Player .. " #00ff00$#ffff00 ) Money ", source, 0, 150, 255, true) outputChatBox("#ff0000*#ffff00[Admin]#ff0000 *".. getPlayerName(source) .. " #ff0000Has Given you #FFFF00( " .. Player .. " #00ff00$#ffff00 ) Money #ff0000 !", Player, 255, 0, 0, true) 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