Damien_Teh_Demon
Members-
Posts
53 -
Joined
-
Last visited
Everything posted by Damien_Teh_Demon
-
The issue is that they are falling through the ground because they are made clientside and the client is not loading those colliders because he is not near it, right?
-
Its something along these lines team = createTeam("Name", r,g,b) addEventHandler"onPlayerWasted",getRootElement(), function() setPlayerTeam(source,team) end)
-
Sorry, i didnt check it, i was in class.
-
then set the team manually, make the team via script, then setPlayerTeam
-
Its not the compelte code, you need to fill out the rest, i was just showing you some things you would need todo.. Whats the error you got?
-
I just told you to use the event onPlayerWasted
-
I think theres a post with a good example, here : viewtopic.php?f=91&t=46007
-
This is the concept, the code is probally not written right, but you would put this where the neter and exit stuff is at, and do it server side. enter code if(getElementData(vehicle,"onOrOff")0then setVehicleEngineState(vehicle,true) else setVehicleEngineState(vehicle,false) end exit code setElementData(vehicle,"onOrOff", getVehicleEngineState(vehicle))
-
use lua tags , not code Also, you need to have this serverside, and use the event onPlayerWasted, like so function doThings --spawning code end addEventHandler("onPlayerWasted", getRootElement(), doThings)
-
You need to use math to get the forward direction of the perspective of the camera, and then set velocity of player that direction using math again in a similar way. Search setting velocity forward, or spawning something infront of a player.
-
What you could do is freeze the object and check if the player is near them, and if so unfreeze it. I dont know if thatll work but just an idea
-
Oh you need to do this like. When a player does /engine check the element data of that vehicle element. If it is nil or off then set it to, on, and when you get it in it checks the element data and turns it on or off according to that. I am at school and dont really wanna write the code, but yeah, easy concept
-
Not tested but you did the for statement wrong i believe. sniper = {} addEventHandler("onResourceStart", resourceRoot, function() local sniper[1] = exports.slothbot:spawnBot( myX, myY, myZ, 0, 286, 0, 0, nil, 33, "guarding", true ) local sniper[2] = exports.slothbot:spawnBot( myX, myY, myZ, 0, 286, 0, 0, nil, 33, "guarding", true ) local sniper[3] = exports.slothbot:spawnBot( myX, myY, myZ, 0, 286, 0, 0, nil, 33, "guarding", true ) local sniper[4] = exports.slothbot:spawnBot( myX, myY, myZ, 0, 286, 0, 0, nil, 33, "guarding", true ) for _,data in ipairs(sniper) do setElementHealth( data, 100 ) end end)
-
Put the stop sound code you would normally use, but in a timer like this setTimer(function() --code here end, 1000, 1) the 1000 is delay, the 1 is how many times
-
Well if you want it to turn off when he gets in you can make a timer for 100ms ( or w/e min is) to turn it off after he gets in or something. I mean, its not the best way, but if its not turning it off it may be that the event you are using is called before he is actually in the car.
-
Im workin on that next update. The server will open by the end of this week and will most likely come out with more updates, the only thing i have to finish is the radio tower system and paratrooper backup perk. Everything else is done with little to 0 bugs.
-
Are you using slothman's zombie script or whatever it is called?
-
Hey, i highly suggest using SQLite instead of a xml file, if you wanna know more information on how here, its from a post a few minutes ago for the same kind of thing Just thought i'd share, i found it much easier to learn than the XML stuff.
-
Im not sure if it needs this or not, cant remmember, but you will most likely need to add it as a object under your admin acl group so it has access to resource managing ( truning on and off, etc ). You just need to add this underneath your admin section of ACL :
-
Again, im not trying to make something for him, but yeah, i just wanna give him a idea on how to save data, not a step by step manual on how to save a vehicle's position , and thanks for the float tip, i just assumed to use int, ill be changing that on my scripts now
-
Solo lo copio y lo pego?o le agrego algo más? Just copy it and paste?, Or I add something else? This should work, and so you know how it works, what it's doing is adding a command and a function, and if the function is called by the command, get all the resources on server, and if the resource pulled from list isnt running ( which is what ~= means ) then start the resource that was pulled from the list of resources. You need to learn how things work before you try to makem work and ask for help, justa tip!
-
Here, i think this is what you want, to have it so player must be out of the vehicle inorder to trigger whatever the marker does. function Towjob(hitElement) if getElementType(hitElement) == "player" and hitElement == localPlayer and not isPedInVehicle(hitElement) then if not guiGetVisible(ar) then local team = getPlayerTeam(hitElement) local theTeamName = getTeamName(team) if ( theTeamName == "Mineiro" )then guiSetVisible(ar, true) showCursor(true) else triggerServerEvent("Box11", hitElement) guiSetVisible(ar, false) showCursor(false) end end end end addEventHandler("onClientMarkerHit", wepMarker1, Towjob) I havent tested but should be somewhere along those lines, if doesnt work add a if statement after first one to see if the player is in a vehicle and if he is then dont do anything. https://wiki.multitheftauto.com/wiki/IsPedInVehicle
-
I reccommend you use sqlite. I will show you some basic ways to use it to your advantage. The first thing your gonna need to do is connect to the database, and create the table if it doesnt exist for what you want to start, and include the variables in there, like so addEventHandler ( "onResourceStart", getRootElement(), function(res) db = dbConnect("sqlite", "vehicles.db") dbExec(db, "CREATE TABLE IF NOT EXISTS vehicle(owner TEXT, x INT, y INT, z INT, xr INT, yr INT, zr INT)") end) Basically what we did above is create a database and then chec kif the table exists, and if not create it with those certain collums. Now lets say you want to insert a new line of data when someone buys car ( i wont say how to do this, im just showing you how to save. ). You would do that with a dbquery, heres an example. dbExec(db, "INSERT INTO `vehicles`(`owner`, 'x','y','z','xr','yr','zr') VALUES(?,?,?,?,?,?,?)", playerAccountNameHere, carx, cary, carz, carxrot, caryrot, carzrot) This is pretty self explanitory ^ Now i will show you how to update and remove. Update dbExec(db, "UPDATE `vehicles` SET x = ? WHERE owner=?", ownerDataHere) DELETe dbExec(db, "DELETE FROM 'vehicles' WHERE owner= ?", carOwner ) These are the bare basics but this should be enough to get you started. Just google "Multi theft auto dbexec" and such to learn it better.
-
Mines over the water near one of the countys..
-
I seen that map and installed looks awesome on video & pictures on forum , but i never found it in game . Can you maybe tell me where it is ? whitch sitty ? sounds funny but.. Its north of one of those countys thats just south of the desert, like near the bridges where the countys connect to desert
