Jump to content

botder

MTA Team
  • Posts

    524
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by botder

  1. Try setAmbientSoundEnabled and report back please.
  2. You don't have to restart the server, only the resource.
  3. botder

    HASH

    https://code.google.com/p/mtasa-blue/so ... ssword.cpp There is the hashing. I hope you understand C++.
  4. I can't really help because I don't know you custom race.
  5. Create a ped, warp it to the vehicle and then set the control states for the ped.
  6. File: _joiner_client.lua (Line 143) triggerServerEvent('onLoadedAtClient', resourceRoot, g_Me ) Add a '--' before the function. When the player is ready (after your stuff) you can trigger the event. triggerServerEvent('onLoadedAtClient', getResourceRootElement(getResourceFromName("race")), localPlayer )
  7. You shouldn't do heavy operations on each frame render. You could save a string with the file path for each item.
  8. value = "120:1" number = tonumber(value:match("%d+")) I don't recommend using that on each render call, but it should work.
  9. This forum is about asking for scripting help and not about asking for full scripts.
  10. Open admin panel, goto Resources, select 'race', press on Settings button and then search for the random map setting.
  11. And he added a gui-label which exclusively shows his name.
  12. botder

    Tables

    These are functions and not "strings/operations". Where did you learn that nonsense? Anyway, after connecting to a MySQL database you can use the function mysql_query function to manipulate the database with the SQL language. http://www.w3schools.com/sql/default.asp Examples: SELECT * FROM `table_name` WHERE `serial`='...' LIMIT 1; UPDATE `table_name` SET `money`=5000, `level`=5, `nick`='Test' WHERE `serial`='...'; INSERT INTO `table_name` (`serial`, `money`, `level`) VALUES ('...', 5000, 3);
  13. Live updates should be possible with sockets. You should write the ingame messages with a shoutbox bot account. Transfer them either with callRemote or with sockets (requires a listening socket on the forum). On the otherside you have to extend the shoutbox code to send new messages to the server over a socket.
  14. Thread title: Teamchat shows on globalchat (messageType == 2)
  15. He sends the message to every player (root) and wonders why everyone can see the message.
  16. local _createBlipAttachedTo = createBlipAttachedTo function createBlipAttachedTo(player, icon, size, r, g, b) return _createBlipAttachedTo(player, icon, size, r, g, b, 255, 0, 100.0) end I forgot the alpha parameter.
  17. botder

    about PHP sdk

    include( "mta_sdk.php" ); $input = mta::getInput(); Taken from https://wiki.multitheftauto.com/wiki/CallRemote#Example
  18. botder

    about PHP sdk

    The URL has a character limit (I think it was 2048 characters). You should use the php stream php://input
  19. getPedMaxHealth should work clientside too, because getPedStat is a client- and serverside function.
  20. Resource: playerblips File: playerblips.lua Add this piece of code, 100.0 is the distance: local _createBlipAttachedTo = createBlipAttachedTo function createBlipAttachedTo(player, icon, size, r, g, b) return _createBlipAttachedTo(player, icon, size, r, g, b, 0, 100.0) end
  21. local xml = xmlLoadFile ( "tents.xml" ) ilosc = 0 -- You have to reset the amount pobierzinfo = xmlNodeGetChildren ( xml ) for i,nam in pairs(pobierzinfo ) do Edit: You have to use the 'xml' variable on xmlUnloadFile and you should place it after item-load for.
  22. Well, you could save your items in that format: <item name="Hunting Backpack" amount="2"/> local c = xmlCreateChild(item) xmlNodeSetAttribute(c, "name", "Hunting Backpack") xmlNodeSetAttribute(c, "amount", 2)
  23. nazwa = nazwa:gsub("%s", "_") Use that to replace whitespace with an underscore. local xml = xmlLoadFile ( "tents.xml" ) ilosc = 0 pobierzinfo = xmlNodeGetChildren ( xml ) for i,nam in pairs(pobierzinfo ) do
  24. setAccountData(vehicleManager,"vehicleamount",counter) setAccountData(vehicleManager,"tentamount",counterTent) vehicleManager is (probably) not an account-pointer. You can't use it with setAccountData.
×
×
  • Create New...