Jump to content

Anderl

Members
  • Posts

    2,266
  • Joined

  • Last visited

Everything posted by Anderl

  1. I didn't get what you mean.
  2. Anderl

    Admin Panel

    Learn Lua: http://lua.org http://lua-users.org/wiki/TutorialDirectory
  3. Anderl

    Admin Panel

    As I said, you don't know how to use that because you must learn Lua. It's not just copy+paste I've got 1151 so I win the cookies
  4. addCommandHandler( "allvehicle", function( p, _, value ) --get player's position local fX, fY, fZ = getElementPosition( p ) --tries to find vehicle model value = getVehicleModelFromName( value ) if value then --creates a new vehicle near the player local _vehicle = createVehicle( value, fX, fY + 2.5, fZ ) if _vehicle then --warps the player to it warpPedIntoVehicle( p, _vehicle ) end else outputChatBox( "Unable to find vehicle model!", p, 255, 0, 0, false ) end end ) Not tested.
  5. Anderl

    Admin Panel

    He'll not know how to use that because he needs to learn Lua first.
  6. Anderl

    Admin Panel

    I don't see why you can't. Just learn the damn language like everybody here did/do then we'll help you when you need help with your OWN scripts.
  7. English skills have nothing to do with scripting abilities. Anyway, CapY knows how to talk right, you must be confusing with any other guy.
  8. Anderl

    I need help

    Saying that it doesn't work without telling any more infos doesn't really help.
  9. Anderl

    I need help

    Didn't I just send you fixed(?, not tested but it's fixed ) code?
  10. Anderl

    I need help

    Show your whole code.
  11. Anderl

    I need help

    addEventHandler( "onResourceStart", resourceRoot, function() --create cuboids local fX, fY, fZ; for index, value in pairs( Turfids ) do --TODO: Might not work if table is indexed fX, fY, fZ = value[1], value[2], value[3] -- less code in params means better organization local cCuboid = createColCuboid( fX, fY, fZ, 10, 10, 10 ); if cCuboid then --add handlers addEventHandler( "onColShapeHit", cCuboid, cuboidHit, false ); end end end ) function cuboidHit( p ) --check whether the player is turfing already or not (what?) if getElementData( p, "YouAreTurfing" ) then outputChatBox( "You are already turfing!", p, 255, 0, 0, false ) return end --some random debug code outputChatBox( "blablabla", p, 0, 255, 255, false ) --turf shit setElementData( player, "YouAreTurfing", true ) triggerClientEvent( player, "tn:Turfing", root ) setRadarAreaFlashing( pArea, true ) local theMoney = math.random(2580, 4930) TurfTimers[ p ] = setTimer( function() --some code end, 300000, 1) end Not tested.
  12. Anderl

    lua learning

    http://lua-users.org/ http://lua.org/
  13. Anderl

    Question

    Use MySQL: Connect to forums' database and check for player username/email/whatever and then check if the player is registered on the server too.
  14. Exactly what I was thinking ( using DirectX functions ), but would not that lag?
  15. That might be because your PC is not that good enough. MTA:SA needs a bit more than GTA:SA to run without lag.
  16. It might be possible but it will make server lag a lot doing the way I thought.
  17. Small fixes on server side code: addCommandHandler('opengate', function(p) if (moveObject(myGate, 500, -781.20001220703, -2624.8000488281, 104.09999847412, 0, 0, 0)) then triggerClientEvent(p, 'onClientPlayerOpenGate', p) end end ) And client side code: addEvent('onClientPlayerOpenGate', true) addEventHandler('onClientPlayerOpenGate', root, function() playSound('sounds/opengate.mp3') end )
  18. If your system is x64, type this in SSH Terminal: apt-get update; apt-get install ia32-libs; apt-get install lib32ncursesw5
  19. God, now everybody is making Counter Strike gamemodes and things from CS.
  20. Anderl

    Question.

    There are instructions on Wiki and some tutorials ( some even with an auto-installer ) in the Linux Server section.
  21. There is no MTA_Server.sh. To start the server, do cd to the path of the server and run mta-server writing this via SSH: ./mta-server.
×
×
  • Create New...