
Jumba'
Members-
Posts
254 -
Joined
-
Last visited
Everything posted by Jumba'
-
Wait, show me the onPlayerHeadshot event and the function that it calls. actually, cant you just remove that part? It's not like it's really needed to kill the player.
-
Err, no idea what you man, but try and do this in the welcome folder create a file called welcome.lua (The error said it couldn't find it, so this is probably the problem) function onPlayerConnect() local joinedPlayerName = getClientName ( source ) outputChatBox ( "Welcome " .. joinedPlayerName .. " your txt " , source, 255, 255, 255 ) end addEventHandler("onPlayerJoin", getRootElement (), onPlayerConnect) and you save the meta as meta.xml then it should work, i think you just didnt name the script welcome.lua Btw, you should put it on the auto start resources at the bottom of mtaserver.conf or something, so it starts when the server is started
-
try this, i replaced setElementHealth with killPlayer addEventHandler("onPlayerDamage", getRootElement(), function (attacker, weapon, bodypart) if bodypart == 9 then local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon) if result == true then killPlayer (source, attacker, weapon) killer = attacker outputChatBox ("You nailed "..getClientName(source).." in the head!!", attacker) outputChatBox ("You were shot in the head by"..getClientName(attacker).."!", source) setPlayerMoney(attacker, getPlayerMoney( attacker ) + 2000 ) end end end) btw, is the local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon) if result == true then part neccesary? can't you just go to killPlayer if the shot bodypart == 9? and is there a onPlayerHeadshot event? searched the wiki, but i couldn't find it =/
-
Maybe you can post the script? =)
-
you have to get the coords yourself, use a position script to save the xyz chords in a file and insert those in the createvhicle command in the map files. I think at page 2 or 3 of this forum there's a position script.
-
Why should they? Even if there's no DM it doesn't matter because gta is a shooting game, when they get guns they shoot, easy.
-
yeah, i remembered when the community used to be helpfull. but all the good people left. and now nobody helps anyone. back then coding was in mIRC, now its Lua, so obviously not as many people know it.
-
You dont have to edit any files i think, just connect to the server, login as admin and type debugscript 3 in the console.
-
The script or upload the maps with like filefront or something? doesnt matter, aslong as we can download them, zip the maps and upload them.
-
but why do they go trough the land without being on the tracks?
-
Yea, i have no idea why they dont spawn, but all those random ID's, couldn't you just use RandInt? http://development.mtasa.com/index.php?title=RandInt =/
-
search.php is also great, search around, there's tons of snippets around on the forum.
-
Make a new group for it, so it'll be like "admingivecash"> "aGiveCash" /> "resource.command" /> "aGiveCash"> "function.admingivecash" access="true"/> try that, maybe that works, and its better than putting it in moderator, if something malfunctions all it can do is set money = /
-
tonumber, no idea the ... I can explain. you see, most vehicles have a 1 word name such as Sultan or Trashmaster, but some have 2 words, such as the News Chopper, but if you put the function like consoleCreateVehicle (player, vname) it only catches the first word, so if you were going to spawn a Police Maverick it would spawn a Police instead. So that's when the ... comes into work. now you have a function like function consoleCreatevehicle (player, ...) local vehicleName = table.concat({...}, " ") what this does is that it will catch all the paramters, and not just the first one. so now it wont only see the Police value, but also Maverick, so when you do the getVehuckeIDFromname function it will get the id of the "Police Maverick" got it?
-
* setGameType * setMapName try those functions.
-
you're setting the weather ever 1 ms? tbh, thats just crazy
-
i tried that. but it flickers even more as the weather is "changed" (to the same one) every 500 milliseconds.
-
oh, so it's not possible to have more than 255 interiors? I thought you could have 65536 interiors But anyway, good thing i know now =)
-
can you post the fixed code? it may help the people who get the problem that you have..
-
no, as it bans if it sees that a player has a weapon, although it can be used if you add it as a resource that hay calls when it is started and then stops when its stopped.
-
Of course, for getting co-ords for objects, player spawns etc, play an offline game of standard SA and use the SA Place Manager there's tons of position scripts on the forum, you can use one of those, i edited mine that it fully creates the whole createvehicle thing so with just the /car command i have a vehicle =)
-
yep, that's it.
-
ah thanks! it works now, the sky does flicker allot though = / and the acl is not needed, it worked without it this is the code i used function syncTime() local realTime = getRealTime() local hour = realTime.hour local minute = realTime.minute setTime( hour , minute ) end setTimer ( syncTime, 500, 0 ) the problem was that setTime is a reserved function (obviously )