-
Posts
413 -
Joined
-
Last visited
Everything posted by ΞĪŚŚÀ
-
function loginPanel() -- Check if autologin is enabled - If yes, then log the player in, else create and show the userpanel local xmlFile = xmlLoadFile(xmlFileName) if xmlFile then status = xmlNodeGetAttribute(xmlFile,"autologin") if (status == "true") then local username = tostring(xmlNodeGetAttribute(xmlFile,"username")) local password = tostring(xmlNodeGetAttribute(xmlFile,"password")) if not (username == "") and not (password == "") then setTimer(triggerServerEvent, 1000, 1, "onRequestAutologin",player,username,password) end else if blackLoginScreen == true then fadeCamera(false,0,0,0,0) end mainWindow = guiCreateWindow(screenWidth/2-mainWidth/2,screenHeight/2-mainHeight/2,mainWidth,mainHeight,"Login panel",false) guiSetVisible(mainWindow, false) mInfo = guiCreateMemo(21,36,411,278,infoText,false,mainWindow) guiMemoSetReadOnly(mInfo,true) guiWindowSetSizable(mainWindow,false) editUsername = guiCreateEdit(53,364,187,25,"",false,mainWindow) guiEditSetMaxLength(editUsername,30) editPassword = guiCreateEdit(53,421,187,25,"",false,mainWindow) guiEditSetMaxLength(editPassword,30) guiEditSetMasked(editPassword,true) lblUsername = guiCreateLabel(67,330,158,38,"Username:",false,mainWindow) guiLabelSetColor(lblUsername,255,0,0) guiLabelSetVerticalAlign(lblUsername,"center") guiLabelSetHorizontalAlign(lblUsername,"center",false) guiSetFont(lblUsername,"default-bold-small") lblPassword = guiCreateLabel(67,389,158,38,"Password:",false,mainWindow) guiLabelSetColor(lblPassword,255,0,0) guiLabelSetVerticalAlign(lblPassword,"center") guiLabelSetHorizontalAlign(lblPassword,"center",false) guiSetFont(lblPassword,"default-bold-small") btnLogin = guiCreateButton(280,368,242,74,"Login",false,mainWindow) guiSetFont(btnLogin,"sa-header") btnToggleRegister = guiCreateButton(548,368,168,74,"Register",false,mainWindow) guiSetFont(btnToggleRegister,"default-bold-small") registerWindow = guiCreateWindow(screenWidth/2-regWidth/2,screenHeight/2-regHeight/2,regWidth,regHeight,"Registration",false) guiWindowSetSizable(registerWindow,false) editRegistrationUsername = guiCreateEdit(98,138,242,25,"",false,registerWindow) editRegistrationPassword = guiCreateEdit(98,195,242,25,"",false,registerWindow) guiEditSetMasked(editRegistrationPassword,true) editRegistrationRepeatPassword = guiCreateEdit(99,252,242,25,"",false,registerWindow) guiEditSetMasked(editRegistrationRepeatPassword,true) lblRegister = guiCreateLabel(24,24,391,97,"Register",false,registerWindow) guiLabelSetColor(lblRegister,0,85,255) guiLabelSetVerticalAlign(lblRegister,"center") guiLabelSetHorizontalAlign(lblRegister,"center",false) guiSetFont(lblRegister,"sa-gothic") lblRUsername = guiCreateLabel(98,113,242,17,"Username:",false,registerWindow) guiLabelSetColor(lblRUsername,0,85,255) guiLabelSetVerticalAlign(lblRUsername,"center") guiLabelSetHorizontalAlign(lblRUsername,"center",false) guiSetFont(lblRUsername,"default-bold-small") lblRPassword = guiCreateLabel(98,171,242,17,"Password:",false,registerWindow) guiLabelSetColor(lblRPassword,0,85,255) guiLabelSetVerticalAlign(lblRPassword,"center") guiLabelSetHorizontalAlign(lblRPassword,"center",false) guiSetFont(lblRPassword,"default-bold-small") lblRepeatPassword = guiCreateLabel(98,230,242,17,"Repeat password:",false,registerWindow) guiLabelSetColor(lblRepeatPassword,0,85,255) guiLabelSetVerticalAlign(lblRepeatPassword,"center") guiLabelSetHorizontalAlign(lblRepeatPassword,"center",false) guiSetFont(lblRepeatPassword,"default-bold-small") btnCancel = guiCreateButton(232,292,179,38,"Cancel",false,registerWindow) guiSetFont(btnCancel,"default-bold-small") btnConfirmRegistration = guiCreateButton(29,292,179,38,"Confirm & register!",false,registerWindow) guiSetFont(btnConfirmRegistration,"default-bold-small") guiCreateStaticImage(440,23,300,345,"images/logo.jpg",false,mainWindow) guiSetVisible(registerWindow, false) guiSetInputEnabled(true) showCursor(true) addEventHandler("onClientGUIClick",btnLogin,onClickLogin) addEventHandler("onClientGUIClick",btnToggleRegister,onClickRegisterToggle) addEventHandler("onClientGUIClick",btnPlayAsGuest,onClickGuest) addEventHandler("onClientGUIClick",btnConfirmRegistration,onClickRegisterConfirm) addEventHandler("onClientGUIClick",btnCancel,onClickCancel) addEventHandler("onRequestIncreaseAttempts",getRootElement(),increaseAttempts) setTimer(guiSetVisible,7000,1,mainWindow,true)
-
حطيته بس نفس المشكلة يشتغل لما اشغل المود تأكد من اسم النآآفذة
-
حط تحت اسم النافذة guiSetVisible(اسم النافذه, false)
-
setTimer(guiSetVisible,7000,1,اسم النافذه,true)
-
شف ذا الموضوع شف ذا يمكن يفيدك addCommandHandler("givetime", function (player,cmd,PlayerName,Time) if PlayerName and Time then local thePlayer = getPlayerFromName(PlayerName) if isElement(thePlayer) then if tonumber(Time) then t[thePlayer]["hour"] = tonumber(Time) outputChatBox("* DONE",player,0,255,0) else outputChatBox("* Error In TIME",player,255,0,0) end else outputChatBox("* Player Not Found",player,255,0,0) end ) else outputChatBox("* givetime <player name> <time>",player,255,0,0) end end ) Talal07
-
جرب -- -- -- File : Main / server ver = "v3.4" rRoot = getResourceRootElement(getThisResource()) local root = getRootElement() local Key = "F4" Teams = { -- here all team name {"Grove", 0, 255, 0}, {"Aztecas", 0, 150, 255}, {"Police", 0, 50, 255}, {"Ballas", 255, 0, 150}, {"No Team", 255, 255, 255}, {"Medic", 6, 183, 248} } local function set(plr, data, bole) if not isElement(plr) then return end return setElementData(plr, data, bole) end local function get(plr, data) if not isElement(plr) then return end return getElementData(plr, data) end addEventHandler("onResourceStart", resourceRoot, function() setGameType("GangWars v3.4") for _,theTeam in ipairs(Teams) do createTeam(theTeam[1], theTeam[2], theTeam[3], theTeam[4]) end for _,AllTeams in ipairs(getElementsByType("team")) do if getTeamFriendlyFire(AllTeams) == true then setTeamFriendlyFire(AllTeams, false) end end setTeamFriendlyFire(getTeamFromName("No Team"), true) for i,v in ipairs(getElementsByType("player")) do bindKey(v, Key, "down", "changeTeame") setElementData(v, "OnJoinFirstSpawn", false) end setElementData(rRoot,"maxPlayer",getMaxPlayers()) end ) addEventHandler("onResourceStop", resourceRoot, function() local players = getElementsByType("player") for k,v in ipairs(players) do set(v, "hjwalah", false) set(v, "Grove", false) set(v, "Aztecs", false) set(v, "Police", false) set(v, "Ballas", false) set(v, "noTeam", false) set(v, "Medic", false) set(v, "GameModeActive", false) end end ) addEvent("onLoadedClient", true) addEventHandler("onLoadedClient", root, function(player) versionDisplay = textCreateDisplay() local versionText = textCreateTextItem("Gang wars " .. ver .. "", 1, 0.975, "clear-normal", 175, 175, 175, 255, 1.1, "right","bottom") textDisplayAddText(versionDisplay, versionText) textDisplayAddObserver(versionDisplay, player) setElementData(player, "CancleFirstSpawn", true) playSoundFrontEnd(player, 16) OutPut("The Download has finnished Succesfully", player, 255, 255, 0) setElementData(player, "OnJoinFirstSpawn", false) end ) addEventHandler("onPlayerJoin", root, function() showTextForPlayer ( source, 6000, 255, 0, 0, 1.5, "Welcome To Gang War Server") showTextForPlayer1 ( source, 6000, 255, 0, 0, 1.5, "Please Wait until the Download Finnished .....!") setCameraMatrix(source,512.2, -1263.57, 32.53,542.16, -1287.07, 17.24) end ) addEventHandler("onPlayerSpawn", root, function() checkWeapon(source) end ) function checkWeapon(player) setTimer(function(player) if isElement(player) then if getElementData(player, "Police") == true then giveWeapon(player, 3) end else takeWeapon(player, 3) end end, 800, 1, player) end addEvent("onClientWantsToSpawn", true) addEventHandler("onClientWantsToSpawn", getRootElement(), function(player, ID, TeamName) if TeamName == "Grove" then setElementData(player, "ID", ID) GroveTeam(player) elseif TeamName == "Aztecas" then setElementData(player, "ID", ID) AztecsTeam(player) elseif TeamName == "Police" then setElementData(player, "ID", ID) PoliceTeam(player) elseif TeamName == "Ballas" then setElementData(player, "ID", ID) Ballas(player) elseif TeamName == "No Team" then setElementData(player, "ID", ID) NoTeam(player) elseif TeamName == "Medic" then setElementData(player, "ID", ID) MedicTeam(player) elseif TeamName == "Drift" then setElementData(player, "ID", ID) hjwalah(player) end end ) function checkWeapon(player) setTimer(function(player) if isElement(player) then if getElementData(player, "Police") == true then giveWeapon(player, 3) end else takeWeapon(player, 3) end end, 800, 2, player) end function onSelectTeam(player) if not isElement(player) then return end local playerTeam = getPlayerTeam(player) showTextForPlayer(player, 5000, 255, 0, 0, 1.5, "You have been assigned to team [" .. tostring(getTeamName(playerTeam)) .. "]") OutPut("To return to spawn press["..Key.."]", player, 255, 255, 255) local playeraccount = getPlayerAccount(player) if playeraccount and not isGuestAccount(getPlayerAccount(player)) then if getElementData(player, "hjwalah") == true then return false end if getElementData(player, "wasgied") == true then return false end setElementData(player, "wasgied", true) local weap0 = getAccountData(playeraccount, "s.weap0") local weap1 = getAccountData(playeraccount, "s.weap1") local weap2 = getAccountData(playeraccount, "s.weap2") local ammo2 = getAccountData(playeraccount, "s.ammo2") local weap3 = getAccountData(playeraccount, "s.weap3") local ammo3 = getAccountData(playeraccount, "s.ammo3") local weap4 = getAccountData(playeraccount, "s.weap4") local ammo4 = getAccountData(playeraccount, "s.ammo4") local weap5 = getAccountData(playeraccount, "s.weap5") local ammo5 = getAccountData(playeraccount, "s.ammo5") local weap6 = getAccountData(playeraccount, "s.weap6") local ammo6 = getAccountData(playeraccount, "s.ammo6") local weap7 = getAccountData(playeraccount, "s.weap7") local ammo7 = getAccountData(playeraccount, "s.ammo7") local weap8 = getAccountData(playeraccount, "s.weap8") local ammo8 = getAccountData(playeraccount, "s.ammo8") local weap9 = getAccountData(playeraccount, "s.weap9") local ammo9 = getAccountData(playeraccount, "s.ammo9") local weap10 = getAccountData(playeraccount, "s.weap10") local weap11 = getAccountData(playeraccount, "s.weap11") local weap12 = getAccountData(playeraccount, "s.weap12") local wanted = getAccountData(playeraccount, "WantedLevel") if tonumber(wanted) then setPlayerWantedLevel(player, wanted) elseif tonumber(weap0) then giveWeapon(player, weap0, 1) elseif tonumber(weap1) then giveWeapon(player, weap1, 1) elseif tonumber(weap2) and tonumber(ammo2) then giveWeapon(player, weap2, ammo2) elseif tonumber(weap3) and tonumber(ammo3) then giveWeapon(player, weap3, ammo3) elseif tonumber(weap4) and tonumber(ammo4) then giveWeapon(player, weap4, ammo4) elseif tonumber(weap6) and tonumber(ammo5) then giveWeapon(player, weap5, ammo5) elseif tonumber(weap6) and tonumber(ammo6) then giveWeapon(player, weap6, ammo6) elseif tonumber(weap7) and tonumber(ammo7) then giveWeapon(player, weap7, ammo7) elseif tonumber(weap8) and tonumber(ammo8) then giveWeapon(player, weap8, ammo8) elseif tonumber(weap9) and tonumber(ammo9) then giveWeapon(player, weap9, ammo9) elseif tonumber(weap10) then giveWeapon(player, weap10, 30) elseif tonumber(weap11) then giveWeapon(player, weap11, 30) elseif tonumber(weap12) then giveWeapon(player, weap12, 10) end end end function camera(plr) if not isElement(plr) then return end setTimer(fadeCamera, 50, 1, plr, false, 1) setTimer(fadeCamera, 100, 1, plr, true, 3) setCameraTarget(plr, plr) showChat(plr, true) end addEventHandler("onPlayerSpawn", root, function() setElementData(source, "FristTimeSpawn", false) bindKey(source, Key, "down", "changeTeame") setElementData(source, "WasChangeTeam", false) end ) Change = false addCommandHandler("changeTeame", function(plr) if getElementData(plr, "WasChangeTeam") == false then setElementData(plr, "ChangeTeam", true) OutPut("The team will change after you die", plr, 255, 0, 255) setTimer(cancleTeam, 1700, 1, plr) setElementData(plr, "WasChangeTeam", true) else OutPut("Change the team has been canceled", plr, 255, 255, 0) setElementData(plr, "ChangeTeam", false) setElementData(plr, "WasChangeTeam", false) end Change = not Change end ) function cancleTeam(plr) if Change == false then return false end OutPut("To cancel the change team press again", plr, 255, 255, 0) end
-
طلبــآت الآكوآد
-
السلام عليكم ورحمة الله وبركاته بفتح سيرفر حياة واقعية ان شاء الله [R.L.A] Real Life Arabic وبيكون النظام وظايف وعصابات وكذا . بس ابغي مبرمجين : D . وباقي كم شغلة ونفتح ان شاء الله طبعا السيرفر اكتمل بنسبة % 70 مابقى الا سهالات واي مبرمج حاب يجي معنا . حياه الله يمكن نفتح زومبي - ريس - الخ . اتمنى عدم الرد خارج الموضوع .. Mr-M3AND .. RoMaNd
-
لاتقول كذا على شعان مايصير عدد السيرفرات 15
-
اولا مو انا الي بعلم ثانيا شف الي كاتب الموضوع . لاتستعجل
-
العب غيرهـآ ______ gamer ______
-
السلام عليكم ورحمة الله وبركاته كيف الحال ياشباب عساكم بخير ! تعليم البرمجة في منتديات . حياة العرب في كثير يبـــون يتعلمون برمجــة وان شاء الله نفيد الجميع طبعا لازم تطبق الشروط وتقدر تشارك بـ الدورة .. القوانين : 1- يجب ان يكون لديك 30 مشاركة < يكون مواضيع جدية وليس فيها استهبال او ردود سطحية 2- عدم الرد بـ (والله لا اشارك بس سجلني) الخ ... < طبق الشروط وتتسجل منعا للاحراج 3- يجب المشاركة الدائمة < ليس فقط توصل 30 مشاركة من اجل تعلم البرمجة الموضوع .. http://www.rla-server.com/showthread.php?t=33 ملاحظة : الي مو مسجل مايقدر يشوف المواضيع .. طبعا المواضيع تلقاه بقسم mta القسم الفرعي: = تعليم برمجة LUA
-
Updated In 14/11/2014 | شرح للمبتدئين فى البرمجة
ΞĪŚŚÀ replied to ™!>VàLéNTiNô<!™'s topic in دروس في البرمجة
شرح حلو ومفيد -------------------- شرح بطريقتي + مثلا انا طلب كود اول مايدخل الاعب السيرفر يجيه فلوس واحد رد وساعدني بالفنكشات "onPlayerJoin" Event givePlayerMoney كيف اضبط كود ؟ طبعا اول شي addEventHandler ذي مهمة لكل شي مثال addEventHandler("onPlayerLogin", root, addEventHandler("onPlayerJoin", root, addEventHandler("onPlayerQuit", root, addEventHandler("onPlayerSpawn", root, addEventHandler("onMarkerHit", root, تالي function ( ) - - نسوي وظيفة الحين نحط الكود مثلا ابيه يعطيه فلوس اول مايدخل بيكون الكود addEventHandler("onPlayerJoin", root, function ( ) givePlayerMoney(source, 15000) end ) واقدر استخدم كثير -
createVehicle - - انشاء سيارة ------------------------------------------------------ اذا تبيه بـماركر createMarker - - انشاء ماركر 'onMarkerHit' - - Event ------------------------------------------------------ اذا تبيه بكلمة addCommandHandler ------------------------------------------------------ اذا تبي بزر 'onClientGUIClick' - - Event
-
اشرحها عدل مو راديو مدري وش
-
لاتكبر الاوبجكتات الصغيرة ._.
-
بالنسسسبة للفري روم اذا طفيته بيطفي معه مود تلقائي اسمه PlayerBlips شغله وخلاص ^
