-
Posts
1,060 -
Joined
-
Last visited
-
Days Won
9
Everything posted by Addlibs
-
[SOLVED] Connected Login Panel to IPS Communite Suite!
Addlibs replied to FlyingSpoon's topic in Scripting
Is mta_sdk.php in the same directory as my php file? -
[SOLVED] Connected Login Panel to IPS Communite Suite!
Addlibs replied to FlyingSpoon's topic in Scripting
That is indeed an internal error (within the PHP). Going to look at the PHP code. Update: At line 6, in the disguised $username, you're missing an ending double-quote-mark — is that just a mistake when censoring details or is that in the actual PHP as-well? -
Actually, the other thing is also a proper theme - click on the caret-down icon, and '> Edit HTML and CSS' should be in the dropdown.
-
[SOLVED] Connected Login Panel to IPS Communite Suite!
Addlibs replied to FlyingSpoon's topic in Scripting
No no, don't replace the ellipsis, it's part of Lua syntax -
[SOLVED] Connected Login Panel to IPS Communite Suite!
Addlibs replied to FlyingSpoon's topic in Scripting
I meant like callRemote("[link]", function(...) outputDebugString(toJSON({...})) end, "verifyPasswords", username, password) -
[SOLVED] Connected Login Panel to IPS Communite Suite!
Addlibs replied to FlyingSpoon's topic in Scripting
Try using the following as callback […] function(...) outputDebugString(toJSON({...})) end […] Also, try checking the error log on your HTTP server. There might be an error in the PHP file itself, especially if the above code outputs something like [ [ "Error", "500" ] ] in the debug -
[SOLVED] Connected Login Panel to IPS Communite Suite!
Addlibs replied to FlyingSpoon's topic in Scripting
It works for me (tested through runcode and outputServerLog). Have you prefixed your PHP with <?php If not, you need to do that. -
[SOLVED] Connected Login Panel to IPS Communite Suite!
Addlibs replied to FlyingSpoon's topic in Scripting
// PHP include 'mta_sdk.php'; // Correct path if you use a different one $servername = "127.0.0.1"; // Change these details $username = "dbuser"; // Change these details $password = "dbuserpassword"; // Change these details $dbname = "dbschema"; // Change these details $table = "core_members"; $accountColumn = "members_seo_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` 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); // Password correct } else { mta::doReturn(false, 1); // Passwords don't match } } else { mta::doReturn(false, 2); // Account not found } } // Author: MrTasty -- Lua local username, password = "johnsmith", "password123" callRemote("URL to .php file", function(response, extra) if response == true then -- password correct else if extra == 1 then -- password incorrect elseif extra == 2 then -- account not found end end end, "verifyPasswords", username, password) -
Oh, my bad. In this case I don't really know why your changes wouldn't appear on the live forum.
-
[SOLVED] Connected Login Panel to IPS Communite Suite!
Addlibs replied to FlyingSpoon's topic in Scripting
There are two ways - edit system/member/member.php in IPS (it might get overridden when updating IPS later though) and edit authentication (change to MD5 hash) - you'll also have to reset your password. The other way is to callRemote PHP that would do all database and password verification and report back to the server -
You're clearly showing two themes on the screenshot - ‘Default’ and ‘Elite Masters Players - Christmas.’ Try editing Elite Masters Players theme since it's set as the default one (i.e. the main theme, used when no other theme is set by the end-user)
-
I believe every (not literally every) vehicle has different sounds for engine and therefore it might be a different group.
-
You're editing the default settings - if you delete your local scoreboard files it'll most probably work. The problem is that scoreboard allows you to edit your settings, so your client settings override the default settings.
-
Try performancebrowser over HTTP interface of the server. It'll give details on CPU usage, memory usage, etc
-
Actually, add <li class='ipsResponsive_hidePhone ipsType_break'> […] </li> just after and outside the foreach loop in core > front > global > customFieldsDisplay to have one extra custom profile field which is constant and always shown for every author If you want to let users chose what to display themselves, I'm afraid you'll need to do a bit of PHP coding for that (creating a plugin or hook)
-
In AdminCP > Customization > Themes > Default > Edit HTML/CSS (> icon)
-
Weapon-type is different from weapon-model. You need to use a resource like bone_attach to use custom weapon model ID
-
Best if you edit the theme files. cAuthorPane_info (the HTML DOM shown in the screenshot) is in forums > front > topics > postContainer.
-
The error is self-explanatory. The resource, on the client side, attempts to call an event on the server side, which doesn't exist. As the event name suggests, the event wants to collect information about the server, such as the server name, gamemode name etc. I am unaware of this being a issue in the unaltered resource — you've probably deleted a server side file or damaged it somehow. Try downloading the default resources package from https://mirror.multitheftauto.com/mtasa/resources/ and replacing your scoreboard with the packed one.
-
If you're talking about many instances of CEF, then I assure you it will lag. However, if you mean many MTA billboard-objects, then you can use just one CEF browser and apply it to a texture without a specific target element (will be applied to all textures of that name, i.e. the billboard screen) (video will be played in sync on every billboard per client)
-
For the unix_socket/mysqld.sock, try restarting MySQL server (mysqld) If that doesn't work, check where your mysqld.sock is stored (it might be elsewhere) - open the file /etc/mysql/my.cnf and look for [client] port = 3306 socket = (path to mysqld.sock) and use that path on dbConnect.
-
You've got to use hex = string.format("#%X%X%X", r, g, b) to convert RGB to Hex color (with preceding hash sign), which you then append as prefix to the player name, and change it to another hex on the suffix of the name or on the succeeding word. Example: local r, g, b = getPlayerNametagColor(thePlayer) local hex = string.format("#%X%X%X", r, g, b) local text = "#FF6464(ADVERT) "..hex .. getPlayerName(thePlayer).." #FFFFFF: "..message
-
I doubt you'd look into the old topics to see Oussez's “stupid enlish.” You are clearly the same person.
-
I have no idea why that might be other than that you may have missed out a minus or something in the position. Try teleporting to the exact position of the colshape (i.e. [OOP] Player("your nickname").position = tempCol[1].position, preferably on a command handler)