-
Posts
173 -
Joined
-
Last visited
-
Days Won
1
Everything posted by #,Dr.To[sh]iBa
-
هذا حصلته بالكلنت حق الساعات return getElementData(plr,"PlayTime")
-
function onPlayerWin(player) outputChatBox("* "..getPlayerName(player).." #FFFF00Has won the Prize #00FF00$"..thePrize,root,255,255,0,true) local Data = getElementData ( player , "PlayTime" ) or 0 setElementData ( player , "PlayTime" , Data + thePrize ) removeCode() end تم يا غالي ولم تشتغل مدري وش الحل
-
استبدلت وما اشتفل function onPlayerWin(player) outputChatBox("* "..getPlayerName(player).." #FFFF00Has won the Prize #00FF00$"..thePrize,root,255,255,0,true) local Data = getElementData ( player , "playTime" ) or 0 setElementData ( player , "playTime" , Data + thePrize ) removeCode() end
-
فقط يا غالي ؟ وهل يشتغل ولا يبيله شئ ثاني
-
سلام عليكم عندي مود اول من يكتب والجائزه تكون فلوس ابي احولها من فلوس الي ساعات وشكرا... --server side --***********************************-- --***********************************-- -- Random Words -- -- By Al3grab -- --***********************************-- --***********************************-- ---- Changeable captchaNums = 5 -- captcha letters length wordTimeInSec = 25 --- the time before the word disappear in seconds [ default 11 seconds ] prizefrom,prizeto = 500,800 -- the prize random num timerfrom,timerto = 1.5,5.5 -- the random timer that shows the word [ default from 3 to 15 minutes ] ---- unChangeable wordOn = false theWord = nil thePrize = nil wordTime = wordTimeInSec * 1000 -- outputDebugString("Random Words By Al3grab | Started") -- function createCode(code,prize) for k,v in ipairs( getElementsByType("player") ) do exports.easytext:displayMessageForPlayer(v,1, "=========", wordTime, 0.07, 0.5, 0, 255, 0, 255, 1.6) exports.easytext:displayMessageForPlayer(v,2, "Word : "..code.."", wordTime, 0.07, 0.533, 255, 255, 0, 255, 1.6) exports.easytext:displayMessageForPlayer(v,3, "Prize : "..prize.."$", wordTime, 0.07, 0.563, 255, 255, 0, 255, 1.6) exports.easytext:displayMessageForPlayer(v,4, "=========", wordTime, 0.07, 0.593, 0, 255, 0, 255, 1.6) end outputChatBox("- Random Words : #FFFF00Enter the word shown below to win the prize.",root,0,255,0,true) outputChatBox("=========",root,0,255,0,true) outputChatBox("Word : "..code.."",root,255,255,0,true) outputChatBox("Prize : "..prize.."$",root,255,255,0,true) outputChatBox("=========",root,0,255,0,true) outputChatBox("- #FFFF00You can see the word down on your screen.",root,0,255,0,true) -- startCodeTimer() wordOn = true end function makeRandomCode(Word,Prize) if ( Word and Prize ) then theWord = Word thePrize = Prize else theWord = makeCaptcha(captchaNums) thePrize = math.random(prizefrom,prizeto) end if ( tostring(theWord) and tonumber(thePrize) ) then createCode(theWord,thePrize) end end function startCodeTimer() codeTimer = setTimer( function () removeCode() outputChatBox("- #FFFF00No one won the prize",root,0,255,0,true) end , wordTime , 1 ) end function removeCode() for k,v in ipairs( getElementsByType("player") ) do exports.easytext:clearMessageForPlayer(v,1) exports.easytext:clearMessageForPlayer(v,2) exports.easytext:clearMessageForPlayer(v,3) exports.easytext:clearMessageForPlayer(v,4) end if isTimer ( codeTimer ) then killTimer(codeTimer) end theWord = nil thePrize = nil wordOn = false end function makeCaptcha(capNumz) theC = "" tCode = { "a","A", "b","B", "c","C", "d","D", "e","E", "f","F", "g","G", "h","H", "j","J", "k","K", "l","L", "m","L", "n","N", "o","O", "p","P", "q","Q", "r","R", "s","S", "t","T", "u","U", "v","V", "x","X", "y","Y", "z","Z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "!", "@", "#", "?" } for k=1,capNumz or 5 do randomCode = math.random (#tCode ) theC = ""..theC..""..tCode[randomCode].."" end return theC end function onPlayerWin(player) outputChatBox("* "..getPlayerName(player).." #FFFF00Has won the Prize #00FF00$"..thePrize,root,255,255,0,true) givePlayerMoney(player,thePrize) removeCode() end function detcetChatMessage(msg,msgtype) if ( wordOn == true and msg and msgtype == 0 ) then if msg == theWord then onPlayerWin(source) end end end addEventHandler("onPlayerChat",root,detcetChatMessage) addEventHandler("onResourceStop",resourceRoot,function() removeCode() end ) function setRandomTimer() setTimer(function() if not wordOn then makeRandomCode() end setRandomTimer() end , math.random(timerfrom,timerto) * 60 * 1000 , 1 ) end addEventHandler("onResourceStart",resourceRoot,function() setRandomTimer() easytext = getResourceFromName("easytext") if ( easytext ) then if getResourceState(easytext) == "loaded" then startResource(easytext) end else outputChatBox("* Error , need for easytext resource to start") cancelEvent() end end ) for k,v in ipairs ( {"randomcode","randomword","rw","rd"} ) do addCommandHandler(v,function(plr,cmd,prize,...) if plr and hasObjectPermissionTo(plr,"function.kickPlayer") then if ( not prize ) then makeRandomCode() else word = table.concat({...}, " ") if ( word ) then makeRandomCode(word,prize) end end end end ) end
-
تسلمون يا عيال تم عمل السكربت ما قصرتم وقسم ....يغلق
-
الز الزبده اني اانا ابي اسوي لو ضغطت علي زر المود يشتغل ولو ضغطت علي زر اخر المود ينطفا وذي اكوادي --client GUIEditor = { button = {}, window = {} } local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 401) / 2, (screenH - 221) / 2, 401, 221, "=[ لوحة التحكم بالعاجل ]=", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 1.00) onm = guiCreateButton(116, 36, 178, 44, "#[ تشغيل العاجل ]#", false, wnd, "start") local font0_font = guiCreateFont(":general_message_sender_en/font.ttf", 16) guiSetFont(onm, font0_font) guiSetProperty(onm, "NormalTextColour", "FF00E300") stopm = guiCreateButton(116, 130, 178, 44, "#[ ايقاف العاجل ]#", false, wnd, "stop") guiSetFont(stopm, font0_font) guiSetProperty(stopm, "NormalTextColour", "FFE20000") addEventHandler ( "onClientGUIClick", root,function() if ( source == onm ) then triggerServerEvent ( "master", localPlayer) end end ) --SERVER SIDE function mmns ( resourceName ) local resource = getResourceFromName ( tx_minimapshop ) if ( getResourceState(resource) == "stoping" )then startResource ( tx_minimapshop ) stopResource(tx_minimapshop1) end end addEventHandler ( "master", root, mmns ) addEvent ( "master", true ) ياريت تشوف الاخطاء وشكرا
-
--SERVERR SIDE function mmns ( resourceName ) local resource = getResourceFromName ( agel ) if ( getResourceState(resource) == "stopping" )then startResource ( agel ) stopResource(agel1) end end addEventHandler ( "master", root, mmns ) addEvent ( "master", true ) --CLIENT --client GUIEditor = { button = {}, window = {} } local screenW, screenH = guiGetScreenSize() wnd = guiCreateWindow((screenW - 401) / 2, (screenH - 221) / 2, 401, 221, "=[ لوحة التحكم بالعاجل ]=", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 1.00) onm = guiCreateButton(116, 36, 178, 44, "#[ تشغيل العاجل ]#", false, wnd, "start") local font0_font = guiCreateFont(":general_message_sender_en/font.ttf", 16) guiSetFont(onm, font0_font) guiSetProperty(onm, "NormalTextColour", "FF00E300") stopm = guiCreateButton(116, 130, 178, 44, "#[ ايقاف العاجل ]#", false, wnd, "stop") guiSetFont(stopm, font0_font) guiSetProperty(stopm, "NormalTextColour", "FFE20000") addEventHandler ( "onClientGUIClick", root,function() if ( source == onm ) then triggerServerEvent ( "master", localPlayer) end end ) ذا الكلنت والسيرفر ممكن تشفلي الاخطاء
-
طيب ذا الكلينت وين السيرفر سايد
-
ايوه يا غالي الاكواد منسوخه من لوحة الادمنيه بس الحين انا ابي الكود الصح اني لو ضغطت علي زر يشغل مود وشكرا يا غالي
-
سوي اي اسماء + يب ابي الكونسل يفتح اللوحه
-
طيب ممكن تعدل الاخطاء + وش سكايبك + انا ابي اسوي لوحة اني لو ضغطت علي زر مود يشتغل ومود ثاني ينطفا ولو ضغطت علي زر اخر يسوي العكس فا كيف وشكرأ...
-
--server side addEvent ( "aResource", true ) if ( action == "stop" ) then if ( startResource ( getResourceFromName ( '3agel' ), true ) ) ( stopResource ( getResourceFromName ( 'AdminMsg-Apple' ) ) ) then text = "started" end elseif ( action == "start" ) then if ( startResource ( getResourceFromName ( 'AdminMsg-Apple' ), true ) ) ( stopResource ( getResourceFromName ( '3agel' ) ) ) then text = "started" end end) اللوحه ما تبي تفتح وش المشكله تكفون --client GUIEditor = { button = {}, window = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 401) / 2, (screenH - 221) / 2, 401, 221, "=[ لوحة التحكم بالعاجل ]=", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.button[1] = guiCreateButton(116, 36, 178, 44, "#[ تشغيل العاجل ]#", false, GUIEditor.window[1], "start") local font0_font = guiCreateFont(":general_message_sender_en/font.ttf", 16) guiSetFont(GUIEditor.button[1], font0_font) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF00E300") GUIEditor.button[2] = guiCreateButton(116, 130, 178, 44, "#[ ايقاف العاجل ]#", false, GUIEditor.window[1], "stop") guiSetFont(GUIEditor.button[2], font0_font) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFE20000") if ( source == GUIEditor.button[1] ) then triggerServerEvent ( "aResource", getLocalPlayer(), guiGridListGetItemText ( aTab2.ResourceList, guiGridListGetSelectedItem( aTab2.ResourceList ), 1 ), "start" ) elseif ( source == GUIEditor.button[2] ) then triggerServerEvent ( "aResource", getLocalPlayer(), guiGridListGetItemText ( aTab2.ResourceList, guiGridListGetSelectedItem( aTab2.ResourceList ), 1 ), "stop" ) end end
-
عندي استفسار ثاني ابي اسوي اني لو ضعط علي هذا الزر المود ذا يشتغل والمود ثاني يقف وذي محاولتي لكن المود يشتغل والمود الثاني ما ينطفي if ( action == "start" ) then if ( startResource ( getResourceFromName ( '3agel' ), true ) ) then text = "started" end elseif ( action == "start" ) then if ( stopResource ( getResourceFromName ( 'AdminMsg-Apple' ) ) ) then text = "stopped" end
-
اشتغلت تسلم يا غالي وقسم ما قصرت
-
هذا الكود انا جايبه من لوحة الادمن فا اكيد يعني كلامك ؟
-
if ( action == "start" ) then if ( startResource ( getResourceFromName ( name ), true ) ) then text = "started" end سلام عليكم ابي اعدل علي ذا الكود واضع اسم مود انا ابيه وشكرا...
-
محد يقدر يسوي كود كامل طيب انا مبتدا
-
ما حد جاوبه يا غالي
-
وش القسم الانسب تراني جديد اسف
-
سلام عليكم ورحمة الله وبركاته ابي كود ان الاسل يفتح برتبه مثلا انا رقيت واحد مانجرس وكود الاسل : QAcl يجي يكتبه ينفتح له الاسل ولو جه احد رتبته ادمن مثلا وكتبها ما ينفتح له وشكرا...
-
#1 شروحات برمجة mta / كيف تربط الزر بشي معين
#,Dr.To[sh]iBa replied to Abdul KariM's topic in دروس في البرمجة
الصراحه شرح روعه