Jump to content


  • Posts

  • Joined

  • Last visited


  • Gang
  • Location

Jumba''s Achievements

Red-Headed Stepchild

Red-Headed Stepchild (19/54)



  1. Jumba'

    timer :S

    Just post the whole code. And that snippet you just wrote fails epically, after end you're supposed to put a ) to close the command handler, thought I have no idea if that's what you want.
  2. Maybe use element data instead, in case they dont have an account ...
  3. Jumba'


    Ban his entire IP range
  4. Look, eh, on the client-side file make sure its triggered with the player as the source so it'd be triggerServerEvent ( "serverRegister", getLocalPlayer(), newUsername, newPassword, newMail ) It should work.
  5. Your lucky I got some exams tomorrow, this presents a perfect opportunity to procrastinate! Try this ... you add the objectID, ZYX, time to open, move to XYZ in the gates table, I've already added your own two gates in it. So basically to open the first gate you do /open 1, and for the second /open 2, etc. Same with /close. I'd recommend adding a colcircle around the gate tho since it's a bit unrealistic to open a gate in SF while riding in LS , or just check the distance between GetDistanceBetweenPoints3D using the gate position as one point and the players position as the other. Oh, and I haven't tested it, but I suppose I'd work -- First thing is to create a table to hold all the coordinates for the gates. -- In the gates table there tables that contain the info for one gate -- { objectID, CoordX, CoordY, CoordZ, Time to move gate in ms, moveToCoordZ, moveToCoordY, moveToCoordZ ) local gates = { { 969, 209.0489654541, 1875.4265136719, 12.140625, 3000, 200.65399169922, 1875.3364257813, 12.140625 }, { 3109, 226.6572265625, 1858.30859375, 14.64695930481, 3000, 226.6572265625, 1858.30859375, 11.64695930481 } } local gate = { } -- this is where we store the gate elements. addEventHandler ( "onResourceStart", getResourceRootElement(), function ( ) for i, tbl in ipairs ( gates ) do -- when the resource start we loop over the gates table gate[i] = createObject ( tbl[1], tbl[2], tbl[3], tbl[4] ) -- we create objects, the numbers 1-4 are the location of the objectID and the XYZ coords. ( see above ) end end ) addCommandHandler ( "open", function ( source, command, gate ) if tonumber ( gate ) then -- if its not a number we cant use it. local i = tonumber ( gate ) if gate[i] then -- if that gate exists we open it up moveObject ( gate[i], gates[i][5], gates[i][6], gates[i][7], gates[i][8] ) -- we open it to the XYZ coords in x amount of seconds, 5 - 8 in the table. else outputChatBox ( "Gate not found", source ) end else outputChatBox ( "Syntax is /" .. command .. " , with gate being a number.", source ) end end ) addCommandHandler ( "close", function ( source, command, gate ) if tonumber ( gate ) then local i = tonumber ( gate ) if gate[i] then moveObject ( gate[i], gates[i][5], gates[i][2], gates[i][3], gates[i][4] ) -- same as above, but since we're closing it (going back to begin position) we use the 2-4 XYZ. else outputChatBox ( "Gate not found", source ) end else outputChatBox ( "Syntax is /" .. command .. " , with gate being a number.", source ) end end )
  6. Is it a module? Or just a normal resource?
  7. wouldn't it be faster to load the languages into a table when the resource starts? I imagine it'd be faster than opening/closing an xml file.
  8. Try these http://jum.pastebin.com/HZqzVr1R http://jum.pastebin.com/f61d7e4f You may have to fix em though, and it can be made much simpler, but yeah, it's something
  9. https://wiki.multitheftauto.com/wiki/SetPedAimTarget ?? Dunno
  10. You sure the script is client-side? -edit- It's not, since warpPedIntoVehicle worked and that's server-side only. You have to create the peds, warp em into the vehicles then use the event system to transfer them to the clients. There you can use setPedControlState
  11. Jumba'

    IRC Script

  12. No, but there was a command you could use in game to display server performance. If I remember correctly, it was /shownet <1 or 0> (1 to show, 0 to hide). I think it's /netstat 1 That's what I use to get the connection data.
  13. Ah okay, I understand. Thanks for the explanation, I'll have to go modify my scripts to make them more secure ;D
  14. What do you mean with not letting the client call any server function? What should I when I have to check if the username/password is in the database then? Or am I understanding you wrong?
  15. Did you check for errors using /debugscript 3 or just in the server console? since not everything gets reported to the console.
  • Create New...