Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 25/05/17 in Posts

  1. مواضيعك نفسها تكرر اكواد جاهزة وتاخذ ليه ماتركبها بنفسك وتشتغل بنفسك في موضوعك السابق بغيت شي الحفظ بالسكل وعطاك زاحف الكود كامل بس عليك تركبه والحين ترجع تكرر نفس الموضوع واكثر من مره الاحظ انك تبي كود جاهز وبعدين دامك تعرف انها بالاكونت داتا ليه ماتسويها وتطرح محاولتك ونصححها لك والمقصد من كلامك انك تبي الكود جاهز , المهم عني ماحب اعطي اكوادك جاهزة خل يجي واحد يعطيك كود جاهز ويتعلم فيك
    2 points
  2. السلام عليكم ورحمة الله أداة لتشفير السيارات, الشخصيات, الاوبجكتات و الاسلحه لحمايتهم من السرقه ABCompiler بعد تشفير الملفات اللاعب بيكون ينزل السياره عادي كأنه ينزل سياره ماهي مشفره وماراح يحتاج ينزلها مره ثانيه بس الفرق بيكون انه الملفات تحتاج مشغل عشان تشتغل الملفات وبدون هذا المشغل الملفات مامنها فايده ومحد يقدر يفتحها حتى ببرامج تعديل المودلز مثل زد مودلر هل فيه احتمال سياراتي تنسرق؟ هذا واقف عليك, لو عطيت احد الملفات كلها الي تطلع لك بعد التشفير بيقدر يشغل السياره في سيرفره (في الإصدار الجاي راح اضيف خاصية قفل السياره على سيرفر محدد) طبعاً الاداه ماقدر أقول انها محمية 100% لانه كل تشفيره لازم لها طريقة تنفك بس التشفيره ماهي ضعيفه وفكها ماهو سهل ابداً وبالطريقة الي انا مستخدمها صراحة حتى انا ما اقدر افك الملفات المشفره والتشفيره كانت موجوده من فتره طويله على الموقع الي تسكر وكان فيه اكثر من 100 مودل تشفر والحمدلله محد كلمني انه احد فك تشفير ملفاته صوره للأداه الخصائص: تقدر تشفر سيارات, اوبجكتات, الاسلحه, وشخصيات (DFF, TXD AND COL) تقدر تقفل سكربت المودل المشفر وبيكون مايشتغل بغير سيرفرك تقدر تستخدم المودل المشفر مع سكربت تحميل خاص بيكون عندك تاق بيكون بداية اسم كل سكربت مودل مشفر والسكربت مابيشتغل لو احد مسح التاق من اسم السكربت (تقدر تختار اسم التاق الي تبيه وقت ماتشتري السكربت) بتوصلك أي تحديثات للأداه بعد ماتشتريها بدون ماتدفع أي رسوم اضافيه اصدار 2.2.0 أصدار 2.1.0 سعر الاداه 15 دولار تخفيض %34 لتاريخ 12/10/16 S Discord: AliA#3459
    1 point
  3. <?php // PHP include 'mta_sdk.php'; // Correct path if you use a different one $servername = "********"; // Change these details $username = "********"; // Change these details $password = "*********"; // Change these details $dbname = "********"; // Change these details $table = "core_members"; $accountColumn = "name"; // change to "email" if you prefer logging in through email $conn = mysqli_connect($servername, $username, $password, $dbname); if (!$conn) { mta::doReturn(false, "Connection failed: " . mysqli_connect_error()); // Account not found #die("Connection failed: " . mysqli_connect_error()); } $input = mta::getInput(); if (isset($input[0]) && isset($input[1]) && isset($input[2]) && $input[0] == "verifyPasswords" ) { $sql = "SELECT `members_pass_salt`, `members_pass_hash`, `members_id` FROM `".$table."` WHERE `".$accountColumn."`='".strtolower($input[1])."' LIMIT 1"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) > 0) { $row = mysqli_fetch_assoc($result); if (crypt($input[2], '$2a$13$' . $row['members_pass_salt']) == $row['members_pass_hash']) { mta::doReturn(true, 0, $row, $input[3], $input[4]); // Password correct } else { mta::doReturn(false, 1, false, false, $input[4]); // Passwords don't match } } else { mta::doReturn(false, 2, false, false, $input[4]); // Account not found } } // Author: MrTasty ?> MTA SERVER SIDE SCRIPT - ABOVE IS PHP SCRIPT function UserLogin(userName,Password,Checksave) if not (userName == "") then if not (Password == "") then callRemote("[LINK]", function(response,extra,data,Checksave,player) if response == true then triggerClientEvent(player,"loginHide",getRootElement()) triggerClientEvent(player,"showNotification",player, "Successfully logged in!", "success") triggerClientEvent(player, "triggerLobby", player) UserData("success", data["member_id"], data["name"], player, userName, Password, Checksave); elseif extra == 1 then triggerClientEvent(player,"showNotification",player, "Password doesn't match!", "error") elseif extra == 2 then triggerClientEvent(player,"showNotification",player, "Account doesn't exist!", "error") end end ,"verifyPasswords", userName, Password, Checksave, source) else triggerClientEvent(source,"showNotification",source, "Please enter your password!", "error") end else triggerClientEvent(source,"showNotification",source, "Please enter your username!", "error") end end addEvent("UserWantToLogin",true) addEventHandler("UserWantToLogin",getRootElement(),UserLogin) So whenever I try to login, it says account doesnt exist, I dont understand what I'm doing wrong? Any help? @MrTasty
    1 point
  4. السلام عليكم ورحمة الله تعالى وبركاته ، اليوم جبت لكم طريقة بسيطة أغلب المبرمجين المحترفين يستعملونها ، مثلا موداتك يوم تنزل على جهاز اللاعب ، يجي الكلينت بس ، وحنا في درسنا اليوم بنتعلم كيف نحميه # طبعا الطريقة مب حقتي بس حابب أشاركها :> أول شي نحط الملفات في جدول : dxLibFiles = { "dxButton.lua", "dxWindow.lua", "dxEditBox.lua", "dxMain.lua" } تمام ، هذولي هم الملفات اللي حابين نحميها بعدها نجي نسوي فنكشن ونسوي فيه لوب لجميع ملفات الجدول ، تم نحذفهم في وس اللوب ، ثم نجيبهم من جديد function SecureFiles() for i=0, #dxLibFiles do fileDelete(dxLibFiles[i]) local files = fileCreate(dxLibFiles[i]) if files then fileWrite(files, "تحياتي ، Skype : Conolel44") fileClose(files) end end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), SecureFiles) أتمنى الدرس يكون فادكم و ، يكون خفيف ظريف هههه في أمان الله
    1 point
  5. createMarker onMarkerHit createObject moveObject
    1 point
  6. الفنكشن خطأ, الصحيح onElementClicked
    1 point
  7. وضح ي أخوي تبي من الجراجات الجاهزة أو انت تبي تصنع جراج
    1 point
  8. 1 point
  9. مادري اذا كان قصدك كذا او لا الي اعرفه وعن تجربة بمودات NG ان تقدر تحط sqlite بدون ماتسوي قاعدة بيانات وكذا وكل هذا من الميتا حق ملف السكل واغلب المودات تشتغل على sql بالتوفيق
    1 point
  10. يقلك طفي المودين
    1 point
  11. السطرين ذول مسويين اتصال بي مودين ثانيين لازم مايكونو يشتغلو exports.NGSQL: exports.server:
    1 point
  12. I tried it out: This is with a radius of 10. Is this the right radius? Because i get weird results if i use > 10 or < 10
    1 point
  13. كلينت : GUIEditor = { edit = {}, button = {}, window = {}, label = {}, gridlist = {}, checkbox = {}, combobox = {} } GUI = GUIEditor function string.contains(string, types) if types == "number" then if tonumber(string) then return true else return false end elseif types == "alphabetic" then if tonumber(string) then return false else return true end end end addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(0.25, 0.23, 0.50, 0.55, "Team Manager", true) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetVisible( GUIEditor.window[1], false ) GUIEditor.gridlist[1] = guiCreateGridList(0.04, 0.09, 0.34, 0.67, true, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Team name", 0.9) GUIEditor.button[1] = guiCreateButton(0.04, 0.84, 0.34, 0.10, "Delete team", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF") GUIEditor.edit[1] = guiCreateEdit(0.71, 0.18, 0.16, 0.07, "", true, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(0.53, 0.19, 0.15, 0.08, "Team name:\n", true, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.edit[2] = guiCreateEdit(0.71, 0.31, 0.16, 0.07, "", true, GUIEditor.window[1]) GUIEditor.edit[3] = guiCreateEdit(0.71, 0.45, 0.16, 0.07, "", true, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(0.53, 0.33, 0.15, 0.06, "R (red)", true, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 255, 0, 0) GUIEditor.label[3] = guiCreateLabel(0.53, 0.47, 0.15, 0.06, "G (green)", true, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 0, 255, 0) GUIEditor.edit[4] = guiCreateEdit(0.71, 0.57, 0.16, 0.07, "", true, GUIEditor.window[1]) GUIEditor.label[4] = guiCreateLabel(0.53, 0.60, 0.16, 0.07, "B (blue)", true, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 0, 0, 255) GUIEditor.button[2] = guiCreateButton(0.53, 0.77, 0.34, 0.10, "Create", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF") GUIEditor.checkbox[1] = guiCreateCheckBox(0.53, 0.69, 0.33, 0.04, "Save team?", false, true, GUIEditor.window[1]) guiSetFont(GUIEditor.checkbox[1], "default-small") GUIEditor.checkbox[2] = guiCreateCheckBox(0.01, 0.78, 0.46, 0.04, "Remove from database? (only the team was created by this resource!)", true, true, GUIEditor.window[1]) guiSetFont(GUIEditor.checkbox[2], "default-small") GUIEditor.button[9] = guiCreateButton(0.53, 0.89, 0.34, 0.09, "Close", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FFFFFFFF") GUIEditor.button[8] = guiCreateButton(0.53, 0.06, 0.34, 0.09, "Player team management", true, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFFFFFFF") for i, v in ipairs( GUIEditor.label ) do guiLabelSetHorizontalAlign( v, "right" ) end GUIEditor.window[2] = guiCreateWindow(0.31, 0.39, 0.38, 0.21, "Confirmation", true) guiWindowSetSizable(GUIEditor.window[2], false) guiSetAlpha(GUIEditor.window[2], 1.00) guiSetVisible( GUIEditor.window[2], false ) GUIEditor.label[7] = guiCreateLabel(0.08, 0.37, 0.42, 0.12, "Are you sure you want to delete team: ", true, GUIEditor.window[2]) guiSetFont(GUIEditor.label[7], "default-small") guiLabelSetVerticalAlign(GUIEditor.label[7], "center") GUIEditor.button[3] = guiCreateButton(0.03, 0.73, 0.34, 0.21, "Yes", true, GUIEditor.window[2]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000") GUIEditor.button[4] = guiCreateButton(0.61, 0.73, 0.34, 0.21, "No", true, GUIEditor.window[2]) guiSetFont(GUIEditor.button[4], "default-bold-small") guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FF00FF00") GUIEditor.label[8] = guiCreateLabel(0.40, 0.37, 0.42, 0.12, "Anubhav?", true, GUIEditor.window[2]) guiSetFont(GUIEditor.label[8], "default-small") guiLabelSetVerticalAlign(GUIEditor.label[8], "center") GUIEditor.window[3] = guiCreateWindow(0.30, 0.24, 0.41, 0.53, "Player team management", true) guiWindowSetSizable(GUIEditor.window[3], false) guiSetAlpha(GUIEditor.window[3], 1.00) guiSetVisible( GUIEditor.window[3], false ) GUIEditor.gridlist[2] = guiCreateGridList(0.02, 0.06, 0.39, 0.92, true, GUIEditor.window[3]) guiGridListAddColumn(GUIEditor.gridlist[2], "Player name", 0.9) GUIEditor.combobox[1] = guiCreateComboBox(0.43, 0.12, 0.53, 1, "", true, GUIEditor.window[3]) GUIEditor.button[5] = guiCreateButton(0.43, 0.19, 0.53, 0.09, "Set team", true, GUIEditor.window[3]) guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFFFFFFF") GUIEditor.button[6] = guiCreateButton(0.43, 0.89, 0.53, 0.09, "Close", true, GUIEditor.window[3]) guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFFFFFF") GUIEditor.button[7] = guiCreateButton(0.43, 0.33, 0.53, 0.09, "Set player teamless", true, GUIEditor.window[3]) guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFFFFFFF") GUI = GUIEditor addEventHandler( "onClientGUIClick", root, function( ) if ( source == GUIEditor.button[5] ) then local item = guiComboBoxGetSelected( GUI.combobox[1] ) local grid = guiGridListGetSelectedItem( GUI.gridlist[2] ) if ( item ~= -1 and grid ~= -1 ) then local text = guiComboBoxGetItemText(GUI.combobox[1], item) local player = guiGridListGetItemText( GUI.gridlist[2], grid, 1 ) if (getPlayerFromName( player )) then if (getTeamFromName( text )) then outputChatBox( "[Team-manager] #00FF00You set "..player.."\'s team to "..text, 255, 120, 0, true) triggerServerEvent( "GUI:setTeam", localPlayer, getPlayerFromName( player ), getTeamFromName( text ) ) else return outputChatBox( "[Team-manager] #FF0000No such team ("..text..") exist!", 255, 120, 0, true) end else return outputChatBox( "[Team-manager] #FF0000No such player ("..player..") is online!", 255, 120, 0, true) end end elseif ( source == GUIEditor.button[9] ) then showGUI( getElementsByType( "team" ) ) elseif ( source == GUIEditor.button[8] ) then guiSetVisible( GUIEditor.window[3], true ) guiSetVisible( GUIEditor.window[1], false ) refreshGridList( getElementsByType( "team" ) ) elseif ( source == GUIEditor.button[6] ) then guiSetVisible( GUIEditor.window[3], false ) guiSetVisible( GUIEditor.window[1], true ) elseif ( source == GUIEditor.button[7] ) then local grid = guiGridListGetSelectedItem( GUI.gridlist[2] ) if ( grid ~= -1 ) then local player = guiGridListGetItemText( GUI.gridlist[2], grid, 1 ) if (getPlayerFromName( player )) then outputChatBox( "[Team-manager] #00FF00You set "..player.."\'s team to nil/no team!", 255, 120, 0, true) triggerServerEvent( "GUI:setTeam", localPlayer, getPlayerFromName( player ), nil ) else return outputChatBox( "[Team-manager] #FF0000No such player ("..player..") is online!", 255, 120, 0, true) end end end end ) addEventHandler( "onClientGUIClick", root, function( ) if (source ~= GUIEditor.button[1]) then return end local r, c = guiGridListGetSelectedItem( GUI.gridlist[1] ) if (r ~= -1) then local text = guiGridListGetItemText( GUI.gridlist[1], r, 1 ) if (getTeamFromName( text )) then openConformWindow( text ) else outputChatBox( "[Team-manager] #FF0000No such team ("..text..") exist!", 255, 120, 0, true) end end end ) local edits = GUIEditor.edit addEventHandler( "onClientGUIChanged", root, function( ) for i, v in ipairs(edits) do if (v ~= edits[1] and v == source ) then local text = guiGetText(source) if not string.contains(text, "number") then local currText = guiGetText( source ) local newText = string.gsub( currText, '[^0-9]', '' ) if newText ~= currText then guiSetText( source, newText ) end end end end end ) addEventHandler( "onClientGUIClick", root, function( b, s ) if (source == GUIEditor.button[2]) then local teamN, r, g, b = guiGetText( GUI.edit[1] ), guiGetText( GUI.edit[2] ), guiGetText( GUI.edit[3] ), guiGetText( GUI.edit[4] ) if (teamN == "") then return outputChatBox( "[Team-manager] #FF0000Team name cannot be empty!", 255, 120, 0, true) end if (getTeamFromName( teamN )) then return outputChatBox( "[Team-manager] #FF0000A team ("..teamN..") with this name already exist!", 255, 120, 0, true) end if (r == "") then return outputChatBox( "[Team-manager] #FF0000R (Red) cannot be empty!", 255, 120, 0, true) end if (g == "") then return outputChatBox( "[Team-manager] #FF0000G (Green) cannot be empty!", 255, 120, 0, true) end if (b == "") then return outputChatBox( "[Team-manager] #FF0000B (Blue) cannot be empty!", 255, 120, 0, true) end outputChatBox( "[Team-manager] #00FF00Team "..teamN.." created!", 255, 120, 0, true) triggerServerEvent( "GUI:createTeam", localPlayer, teamN, r, g, b, guiCheckBoxGetSelected( GUI.checkbox[1] ) ) end end ) addEventHandler( "onClientGUIClick", root, function() if (source == GUIEditor.button[4]) then guiSetVisible(GUIEditor.window[2], false) guiSetVisible(GUIEditor.window[1], true) elseif (source == GUIEditor.button[3]) then guiSetVisible(GUIEditor.window[1], true) local text = guiGetText( GUI.label[7] ):gsub( "Are you sure you want to delete Team ", "") local selected = guiCheckBoxGetSelected( GUI.checkbox[2] ) triggerServerEvent( "GUI:deleteTeam", localPlayer, text, selected ) outputChatBox( "[Team-manager] #00FF00Team "..getTeamName( getTeamFromName( text ) ).." deleted!", 255, 120, 0, true) guiSetVisible(GUIEditor.window[2], false) end end ) end ) function closeAllWindows( ) for i, v in ipairs( GUIEditor.window ) do guiSetVisible( v, false ) end end function openConformWindow( teamName ) guiSetVisible( GUIEditor.window[1], false ) guiSetText( GUIEditor.label[8], teamName.."?" ) guiLabelSetColor( GUIEditor.label[8], getTeamColor( getTeamFromName( teamName ) ) ) guiSetVisible( GUIEditor.window[2], true ) guiBringToFront( GUIEditor.window[2] ) end function refreshGridList( team ) guiGridListClear( GUI.gridlist[1] ) guiGridListClear( GUI.gridlist[2] ) guiComboBoxClear( GUI.combobox[1] ) for i, v in ipairs( team ) do local name = getTeamName( v ) local r, g, b = getTeamColor( v ) local row = guiGridListAddRow( GUI.gridlist[1] ) guiGridListSetItemText( GUI.gridlist[1], row, 1, name, false, false ) guiGridListSetItemColor( GUI.gridlist[1], row, 1, r, g, b ) guiComboBoxAddItem( GUI.combobox[1], name ) end for i, v in ipairs( getElementsByType( "player" ) ) do local row = guiGridListAddRow( GUI.gridlist[2] ) local r, g, b = getPlayerNametagColor( v ) guiGridListSetItemText( GUI.gridlist[2], row, 1, getPlayerName( v ), false, false ) guiGridListSetItemColor( GUI.gridlist[2], row, 1, r, g, b ) end end addEvent( "GUI:refresh", true ) addEventHandler( "GUI:refresh", root, refreshGridList ) function showGUI( teamlist ) refreshGridList( teamlist ) if (guiGetVisible( GUI.window[2] ) == true ) then closeAllWindows() showCursor( false ) return end if (guiGetVisible( GUI.window[3] ) == true ) then closeAllWindows() showCursor( false ) return end local show = not guiGetVisible( GUI.window[1] ) guiSetInputMode( "no_binds_when_editing" ) if (show == false) then closeAllWindows( ) else guiSetVisible( GUI.window[1], show ) end showCursor( show ) end addEvent( "GUI:show", true ) addEventHandler( "GUI:show", root, showGUI ) سيرفر connection = dbConnect( "sqlite", "teams.db" ) dbExec( connection, "CREATE TABLE IF NOT EXISTS teams( teamName TEXT, rgb TEXT )") _team = createTeam local function createTeam( team, r, g, b, selected ) _team( team, r, g, b ) if (selected) then dbExec( connection, "INSERT INTO teams( teamName, rgb ) VALUES(?,?)", team, tostring(r..","..g..","..b)) end end function splitTeam( teamRGB ) local t = split( teamRGB, "," ) return t[1], t[2], t[3] end function tob( p ) if (p == "true") then return true elseif (p == "false") then return false end end function canPlayerOpenPanel( p ) local acls = settings['aclCanOpen'] if (#acls == 0) then return true end if (acls[1] == "" and #acls == 1) then return true end local acc = getPlayerAccount( p ) if (not isGuestAccount( acc )) then local accName = getAccountName( acc ) for i, v in ipairs( acls ) do if (isObjectInACLGroup( "user."..accName, aclGetGroup( v ) ) ) then return true end end else return false end return false end function bindKeyForPlayer( p ) if (settings['bindKey']) then if (settings['bindKey'] ~= "") then bindKey( p, settings['bindKey'], "down", openACL) end end end function loadTeams( ) local selection = dbQuery( connection, "SELECT * FROM teams" ) local poll = dbPoll( selection, -1 ) if (poll) then for i, v in ipairs(poll) do local team, rgb = v.teamName, v.rgb local r, g, b = splitTeam( rgb ) _team( team, r, g, b ) end end end function deleteTeam(teamName, removeDatabase, source) if getTeamFromName(teamName) then destroyElement(getTeamFromName(teamName)) end if (removeDatabase) then dbExec( connection, "DELETE FROM teams WHERE teamName=?", teamName ) end triggerClientEvent( source, "GUI:refresh", source, getElementsByType( "team" ) ) end --- --- --- function createSavedTeam(p, _, team, r, g, b, save) if (not canPlayerOpenPanel(p)) then return end if (team and r and g and b and save) then if (team == "") then return outputChatBox( "[Team-manager] #FF0000Team name cannot be empty!", p, 255, 120, 0, true) end if (getTeamFromName( team )) then return outputChatBox( "[Team-manager] #FF0000A team ("..team..") with this name already exist!",p, 255, 120, 0, true) end if (r == "") then return outputChatBox( "[Team-manager] #FF0000R (Red) cannot be empty!",p, 255, 120, 0, true) end if (g == "") then return outputChatBox( "[Team-manager] #FF0000G (Green) cannot be empty!",p, 255, 120, 0, true) end if (b == "") then return outputChatBox( "[Team-manager] #FF0000B (Blue) cannot be empty!",p, 255, 120, 0, true) end if (save ~= "true" and save ~= "false") then return outputChatBox( "[Team-manager] #FF0000Save has to be either true or false!",p, 255, 120, 0, true) end if (not tonumber( r )) then return outputChatBox( "[Team-manager] #FF0000R (Red) has to be a number!",p, 255, 120, 0, true) end if (not tonumber( g )) then return outputChatBox( "[Team-manager] #FF0000G (Green) has to be a number!",p, 255, 120, 0, true) end if (not tonumber( b )) then return outputChatBox( "[Team-manager] #FF0000B (Blue) has to be a number!",p, 255, 120, 0, true) end outputChatBox( "[Team-manager] #00FF00Team "..team.." created!", p, 255, 120, 0, true) createTeam( team, tonumber( r ), tonumber( g ), tonumber( b ), tob( save ) ) else return outputChatBox( "[Team-manager] #FF0000Syntax: /tcreate <team_name> <red> <green> <blue> <save>",p, 255, 120, 0, true) end end addCommandHandler( "tcreate", createSavedTeam) function deleteATeam( p, _, teamName, save ) if (not canPlayerOpenPanel(p)) then return end if (teamName and save) then if (teamName == "") then return outputChatBox( "[Team-manager] #FF0000Team name cannot be empty!", p, 255, 120, 0, true) end if (save ~= "true" and save ~= "false") then return outputChatBox( "[Team-manager] #FF0000Save has to be either true or false!",p, 255, 120, 0, true) end if (getTeamFromName( teamName )) then outputChatBox( "[Team-manager] #00FF00Team "..getTeamName( getTeamFromName( teamName ) ).." deleted!",p, 255, 120, 0, true) deleteTeam( teamName, tob( save ), p ) else outputChatBox( "[Team-manager] #FF0000No such team ("..teamName..") exist!", p,255, 120, 0, true) end else return outputChatBox( "[Team-manager] #FF0000Syntax: /tdelete <team_name> <save>",p, 255, 120, 0, true) end end addCommandHandler( 'tdelete', deleteATeam ) function createTeamEvent( teamName, R, G, B, selected ) createTeam( teamName, R, G, B, selected ) triggerClientEvent( source, "GUI:refresh", source, getElementsByType( "team" ) ) end addEvent( "GUI:createTeam", true ) addEventHandler( "GUI:createTeam", root, createTeamEvent ) function deleteTeamEvent( teamName, selected ) deleteTeam( teamName, selected, source ) end addEvent( "GUI:deleteTeam", true ) addEventHandler( "GUI:deleteTeam", root, deleteTeamEvent ) function bindKeys() if (eventName == "onPlayerLogin") then bindKeyForPlayer( source ) elseif (eventName == "onResourceStart") then setTimer ( function ( ) if (settings['command'] and settings['command'] ~= "") then addCommandHandler(settings['command'], openACL) end loadTeams() end , 1500 , 1 ) for i, v in ipairs(getElementsByType("player")) do bindKeyForPlayer( v ) end end end addEventHandler( "onPlayerLogin", root, bindKeys ) addEventHandler( "onResourceStart", resourceRoot, bindKeys ) function openACL( plr ) if (canPlayerOpenPanel( plr )) then local teams = getElementsByType( "team" ) triggerClientEvent( plr, "GUI:show", plr, teams ) end end function setPTeam( player, team ) setPlayerTeam( player, team ) end addEvent( "GUI:setTeam", true ) addEventHandler( "GUI:setTeam", root, setPTeam ) اول ماتشغل المود انتظر ثانتين واكتب الامر teamm
    1 point
  14. شكرا على رايك :* local Check = { [ 'window' ] = true , [ 'button' ] = true , [ 'label' ] = true , [ 'memo' ] = true , [ 'combobox' ] = true , [ 'radiobutton' ] = true , [ 'edit' ] = true , [ 'tab' ] = true , [ 'tabpanel' ] = true } function guiGetElement ( Name , Type ) if ( type ( Name ) == 'string' and Check [ Type ] ) then for _ , v in ipairs ( getElementsByType ( 'gui-' .. Type ) ) do if ( guiGetText ( v ) == Name ) then return v end end end return false end
    1 point
  15. You might want to reply @pepsi18 it is a bit rude if you do not.
    1 point
  16. تشكر على مجهودك لكن الاخ مستر جراند ماقصر بشرحه وشرح غلط فوق openو close المفروض معرفين وما شرحت الجملة التركيبية ذذ وناقص نوعا ما سوري
    1 point
  17. لاتضبط , لكن نسيت انك مستعمل الالمنت داتا هذا الفنكشنات المطلوبة "onPlayerQuit" getElementData getPlayerAccount isGuestAccount setAccountData -- part 2 "onResourceStart" getElementsByType getPlayerAccount isGuestAccount getAccountData triggerClientEvent "onPlayerLogin" getAccountData triggerClientEvent
    1 point
  18. اوووووووووووووووووللللللللللللله نهاية العالممممممممممممممممممممممممممممممم اخيرا عبد الكريم عطا كود جاهز
    1 point
  19. كيمياء فيزياء رياضيات خذ اول حرف من كل كلمة كفر
    1 point
  20. جميل لكن بالنسبه للعربي والانجليزي بالتحديث القادم حاليا النسخه بتنزل عربية بنسبة 99% بسبب ضيق الوقت بس ومشكور على رايك يا غالي
    1 point
  21. string.sub راح تستخدم فائتدها انها تحدد لك نص مثلا عندي هذا التكست local txt = "ZA7F MTA" وما بطلع منه اول حرف بطلع من ثاني حرف للنهاية اسوي كذا : local txt = "ZA7F MTA" function getText ( ) return string.sub ( txt, 2, #txt ) end لنهاية التكست A كذا راح يطلع من حرف .
    1 point
  22. رائعه الوظيفة صراحتاً , بس لو تعدل عليها مو شرط لوحة اي شيء من العناصر الي بـ gui
    1 point
  23. Bonsoir, Je m'excuse du délai de réponse. Une bonne piste pour commencer c'est de suivre les tutos de la section française du wiki officiel MTA: https://wiki.multitheftauto.com/index.php?title=FR/Main_Page Regarde la section de droite "Programmer" et de préférence dans l'ordre. Ces tutos t'apprendront les fondamentaux dont la nuance compliqué des scripts client et serveur. Bonne lecture et soit patient, ne saute pas certains fondamentaux qui pourrait te faire perdre énormément de temps ensuite pour comprendre d'où vient un problème qui aurait pu être évité de base. Bon code !
    1 point
  24. For connection forum profile picture to ingame profile picture: Using PHP SDK: Use PHP SDK to call a function which sends it the link of the image to use "fetchRemote" from. And update it.
    1 point
×
×
  • Create New...