Jump to content

GTX

Members
  • Posts

    1,273
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GTX

  1. Use this class: https://github.com/olada/MyBBIntegrator Put it somewhere, doesn't matter where. You'll have to also download MTA PHP SDK: http://code.opencoding.net/mta/mtaphpsdk_0.4.zip So, PHP should look like this: <?php define("IN_MYBB", NULL); // Is it in MyBB root directory? require "sdk/mta_sdk.php"; // Include your MTA PHP SDK $input = mta::getInput(); // Get input that is sent via callRemote global $mybb, $lang, $query, $db, $cache, $plugins, $displaygroupfields; // Global variables. require_once "/var/www/local/mybb/global.php"; // Global PHP file of MyBB. require_once "/var/www/local/mybb/api/integrator.php"; // Integrator class you downloaded. $c = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config); // Class init. $auth = $c->login($input[0], $input[1]); // Check if username and password is correct. Will return true if user was successfully logged in. mta::doReturn($auth); // Send back to MTA. ?> And Lua code: function receiveDetails(username, password) callRemote("http://127.0.0.1/mybb/mta/auth.php", callback, username, password) -- You might also wanna send player so you can get who logged in. end addEvent("sendAuthenticationRequest", true) addEventHandler("sendAuthenticationRequest", root, receiveDetails) function callback(ret) if tostring(ret):lower() == "error" then return outputChatBox("An unknown error has occurred", root, 255, 0, 0, true) end if ret then -- Successfully logged in. else -- Wrong username or password or user does not exist. end end
  2. Haha, yeah that might be the best and easiest option
  3. Did you put event handler? Does button even exist? Show us full code if this doesn't work: function buttonPick() if (source == Button_VS_sn) then if isPedInVehicle (localPlayer) then local Vehicle = getPedOccupiedVehicle (localPlayer) local x, y, z = getElementPosition(Vehicle) local vehicleZoneName = getZoneName ( x, y, z ) guiSetText(zonexad, "Veh Zone: "..vehicleZoneName) end end end addEventHandler("onClientGUIClick", guiRoot, buttonPick)
  4. Use shader. http://mortoray.com/2015/06/05/quickly- ... gl-shader/ This might come in handy.
  5. GTX

    SDK PHP Error

    1. It means that player variable is not defined. 2. Put mta_php resource in ACL under Admin group.
  6. Did you ask seller? If you want us to help you, we need more information. (Maybe HTML code?)
  7. GTX

    Flare Object ID

    It's a particle. https://community.multitheftauto.com/index.php?p ... ls&id=1292 ID 2060 - smoke_flare
  8. https://wiki.multitheftauto.com/wiki/DxDrawProgressBar
  9. If you set it to none, yes.
  10. GTX

    Solved

    Use addAccount(username, password, true) to allow case variations. However, I think you can't create account "test" because it's reserved.
  11. Oh, right. You must loop through all players, because parameters in function are not declared. I don't recommend using outputChatBox in this case. You can draw a bubble above player's head instead.
  12. Player can bind chat input to another key, so bindKey isn't an option. Put setTimer below triggered function. function check ( thePlayer, _, playername ) if ( playername ) then local player = getPlayerFromName ( playername ); if ( player ) then triggerClientEvent ( "isPlayerConsoleActive", thePlayer, player, "receiveActiveState" ); else outputChatBox ( "player not found.", thePlayer ); end end end setTimer(check,50,0) (By the way, setTimer - not a good idea imo)
  13. Valid values of allow_gta3_img_mods are: none and peds https://wiki.multitheftauto.com/wiki/Se ... 3_img_mods
  14. GTX

    Nill

    Maybe full script? Also try this. ... if ( getElementData(localPlayer, "VIP") ~= "Silver" ) then ...
  15. This is not a request forum. https://forum.multitheftauto.com/viewtopic.php?f=91&t=47897 You can find scripts at https://community.multitheftauto.com/
  16. GTX

    2 Clients

    VMWare with Windows 7 Ultimate installed. It works for me.
  17. outputChatBox(player, "Lagging ping:"..getPlayerPing(player)) This is wrong. Correct (full): function detektor() for i, player in ipairs(getElementsByType("player")) do if (getPlayerPing(player) >= 100) then outputChatBox(getPlayerName(player).." is lagging: "..getPlayerPing(player), root, 255, 255, 255, true) end end end setTimer(detektor, 2000, 0)
  18. Yes, but not fetchRemote. MTA PHP SDK is needed to send username and password and then authenticate using sources I gave you. Use callRemote.
  19. I think it's because of callRemote. When callRemote returns back to MTA, I guess data gets lost somewhere. It would be useful if we full code. Also, callRemote requires rights to execute it.
  20. 1. getVehicleComponents cannot get object's components. I don't know if there's such function as "getObjectComponents". Or it's not implemented yet. 2. IFP was disabled because it was bugging internal GTA animations. 3. To keep them from dirty hands and still use cache (so they don't download it every time they join), you can encrypt them with teaEncode and base64Encode and then decrypt them when they join and load them. If you really want to not have them downloaded to their computers, use cache attribute in meta (Really bad idea in my opinion as users will have to download 100 MB or so every time they join your server).
  21. Why would you work internally in MTA? With callRemote and MTA PHP SDK you can achieve anything. Also, see this post. https://forum.multitheftauto.com/viewtopic.php?f ... 50#p854695
  22. Do you have IPB 4.x? I found this link and it might be helpful. https://github.com/sijad/IPS4RemoteLogin Put remote.php into root folder of IPB and see example.php for examples. Also, there are inbuilt libraries: https://community.invisionpower.com/4do ... dlers-r97/ https://community.invisionpower.com/4do ... n-sso-r98/
  23. Cool! Nice job to developers, who are keeping MTA alive. 2015 was a great one, looking forward to 2016. Merry christmas and happy new year!
  24. Wow... logo is copy of ffs, scripts are copy of ffs... stop this. Don't steal, you pathetic human.
  25. Hahaha! Most pathetic thing I ever saw. Looks totally same as FFS' one. Meh... why are there so much pathetic people, especially this one in MTA community?
×
×
  • Create New...