driver2
MTA Contributors-
Posts
139 -
Joined
-
Last visited
Everything posted by driver2
-
Why don't you look at the MTA Community ?
-
lol i never use notepad++ but dont like use notepad Have you tried Notepad++ once? It's really different from the Windows Notepad. Besides the similarity of the name and the purpose of text editing.
-
You probably wanna spawn every player at one of the spawnpoints randomly? -- This function spawn the given player at one of the spawnpoints function spawn(player) local spawnpoints = getElementsByType("spawnpoint") -- retrieve a table with all spawnpoints if (#spawnpoints == 0) then return false end -- if there are no spawnpoints, stop executing -- get a random number between 1 and the number of items in the table 'spawnpoints' local rand = math.random(1,#spawnpoints) -- retrieve the coordinates from the selected spawnpoint local posX = getElementData ( spawnpoints[rand], "posX" ) local posY = getElementData ( spawnpoints[rand], "posY" ) local posZ = getElementData ( spawnpoints[rand], "posZ" ) -- spawn the player spawnPlayer(player, posX, posY, posZ) end -- With just this function, nothing will happen at all. We still need to add event handlers that perform the desired action when the script is loaded as well as when a new player joins the game. function resourceStarted() for k,v in ipairs(getElementsByType("player")) do -- loop through all players currently on the server spawn(v) -- and spawn each one of them using the function we made before end end -- bind the handler to the root of THIS resource, meaning it will be triggered when THIS resource is started, else it would be triggered as soon as any other resource is started as well, as long as it runs addEventHandler("onResourceStart", getRootElement(getThisResource)), resourceStarted) function playerJoined() spawn(source) -- spawn the player who joined, in this event it is 'source' end addEventHandler("onPlayerJoin", getRootElement(), playerJoined) I haven't tested it, so it may still contain errors. Documentation pages you might wanna read to understand this: http://development.mtasa.com/index.php? ... entsByType http://development.mtasa.com/index.php? ... pawnPlayer http://development.mtasa.com/index.php? ... entHandler http://www.lua.org/manual/5.1/manual.ht ... ath.random
-
Looks nice. Just take a look as-ship.lua how to create explosions. It's just a couple of timers with createExplosion() calls. You'd have to change the event handler of course, to onAssaultEndRound and check the first parameter if the base was conquered or not.
-
The Scripting Introduction introduces into Lua Scripting for MTA, not Lua Scrpting in general. You still need to know how to code first.
-
Players are Elements in MTA. You could see it as an unique ID (Identification), but it's not a simple number, but rather some more obscure data, like an object. When a player joins, an player object is created and passed on to the onPlayerJoin event, which you can use to greet the player on join or something. When a player leaves, the object is destroyed. I'm not sure what you are trying to do exactly, but if you want to get all players on the server, you can just use getElementsByType (see the example).
-
Seems like someone knows how to use BBCode. I don't think there is a way in race, but you could automatically kick/ban using MTA:mA scripts when someone who is muted uses PMs. Of course that is not really what you wanted, but I guess someone who is spamming that much won't have much time to play normally anyway.
-
Anybody gonna shut the f*ck up and let them finish MTA SA DM
driver2 replied to a topic in General discussion
Do I understand you correclty? You are complaining about crashes, but you don't want to wait for a stable version. -
Thanks to slick and AlienX for posting what I wanted to post. I also want to add that you have every right to be disappointed when it's not released, but I don't see the point in flaming against the team and I am kind of surprised that waiting occupies all of some people's time, since they state they would 'stop waiting' and 'wait for something else', if it's not released soon. I didn't know it took that much time to surf on the MTA page every once in a while. But of course you also think that the MTA Team are all lazy slackers that are only fooling around while you are busy waiting..
-
Line 59: elseif ($3 == !points) mta.text $1 $mta.nick($1,%a) $+ 's Points: $prs.points($1,$2) Change $prs.points($1,$2) to $prs.points($1,%a)
-
I'm not sure, but it might be this line. if (%a < 6) { Just set the number higher. Use STRG+F on the mta.mrc file in order to find it.
-
You should probably use a newline for comments, like it was last time. I'm sure it will be fixed soon. Nice tutorial by the way. Not quite what I expected, but it shows once again the power of Lua and MTA. .edit. The link to the complete script results in a 404.
-
You can call external programs like a compiler or interpreter out of most editors. Also there are features like syntax highlighting, code folding, function listing, auto completion and more in many editors to make coding easier.
-
Pawn can also be edited with any editor (like Notepad), Pawno just provides some extra functionality like compiling from within the GUI. Use Google to find other Editors. Mostly they will have more functions like syntax highlighting which could be useful.
-
You don't need any software besides an ordinary text-editor to write Lua. To run scripts you can use a standalone interpeter. But of course you won't be able to test MTA related Lua scripts without MTA. http://lua.org http://lua-users.org
-
I thought only the creator of the warper should be teleported.
-
Nice idea, some nicknames are annoying to type.
-
Maybe I'm just stupid right now, but if another player than the one who created the teleporter steps into it and triggers the 'Script_onPlayerClick' Function, will it not beam the owner of the teleporter to the destination?
-
http://forum.mtavc.com/viewtopic.php?t=18939
-
One of the biggest probs with MTASA right now...
driver2 replied to wankawitz's topic in Suggestions
No collision during the whole race should defniately an option. When I think of flying maps.. any scratch at the wings is pretty bad. There are often people flying very near to each other and though it can be very exciting to get that close in a Hydra at top speed, it mostly results in crashes. As you normally can't controll that much if you're flying into other people or not, no collision would be a neat addition. -
As the endrace event is practically the same as the startrace event, you should check it at every death event.
-
I tried a in MTA Gamepad once, but I always played with Keyboard, as I don't have any consoles. I use Keyboard to do this. I fly Ace.map fullspeed without rerouting except for the one tunnel in the countryside where I slow down a bit.
-
The problem is, you don't know which map is a DM map. You would have to make a list of all DM maps. Or at least check if someone respawns before the map ends.
-
http://www.game-monitor.com/search.php? ... rder=grank
-
Look at the same site under 'Server'. It uses the newest version. http://drivertva.de/serverinfo