Anderl
Members-
Posts
2,266 -
Joined
-
Last visited
Everything posted by Anderl
-
I didn't get what you mean.
-
Learn Lua: http://lua.org http://lua-users.org/wiki/TutorialDirectory
-
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
-
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.
-
He'll not know how to use that because he needs to learn Lua first.
-
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.
-
English skills have nothing to do with scripting abilities. Anyway, CapY knows how to talk right, you must be confusing with any other guy.
-
Saying that it doesn't work without telling any more infos doesn't really help.
-
Didn't I just send you fixed(?, not tested but it's fixed ) code?
-
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.
-
http://lua-users.org/ http://lua.org/
-
Exactly what I was thinking ( using DirectX functions ), but would not that lag?
-
That might be because your PC is not that good enough. MTA:SA needs a bit more than GTA:SA to run without lag.
-
It might be possible but it will make server lag a lot doing the way I thought.
-
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 )
-
If your system is x64, type this in SSH Terminal: apt-get update; apt-get install ia32-libs; apt-get install lib32ncursesw5
-
God, now everybody is making Counter Strike gamemodes and things from CS.
-
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.
