
heavy air
Members-
Posts
121 -
Joined
-
Last visited
Everything posted by heavy air
-
thanx for fast reply i have looked on that page but im not sure how to download the resources do i just need to rewrite them myself or am i missing something obvious not sure what is going on. I am sure that i downloaded the resources from googlecode as RAR files before but i cant seem to find them now and every where i look in the forums just links back to the same page i can view the scripts within the resources but i am unable to download them any help really appreciated
-
sorry to double post but didnt think this was worth another thread have got server and client running fine but i cant find the resources i need to download for the Nightly version ( i thought i had them but no ) i went to the googlecode page but there is nothing under download tab and im not sure where else to try thanx for any help
-
wow that was fast thank you very much will give it a try now feelin rather dumb dont know how to "compile"? all the stuff into a running version i tried installing all the files over top of MTA DP 2.3 ( thats why it didnt show different version? ) not really sure what im doin here so if someone could explain what i need to do or tell me that i have no chance due to my limited knowledge i would appreciate any answer will there be a working release that i can just write scripts for eventualy or am i going to have to find out how to make this work for myself ( really wanna play with peds thinking zombie panic / zombie survivor gamemode ) EDIT:2 feelin really dumb now just found what i think is the working version of nightly build it says i need to go to google code page and get some other files to run it so i will give it a go not sure where i went wrong before as all i found were the files on google code page but not the nightly installer WISH ME LUCK thanx for any help
-
Hi all sorry if this question has been asked already ( i have tried searching the forums but no luck ) i am trying to get a server running with the nightly build so far i have downloaded and replaced the NET.DLL files in server and client and copied all the new resources but im not sure what else to do now. The sever and client are running fine but version still reports as DP 2.3 {client} and 1.0-DP2 {server} ( dont know if that matters or not ) and all the resources i have tried to run that say they are for the nightly builds dont seem to work ie. Parachutes , Peds , Animb ( from MTA resources page and the MTA forums ). not sure if i need a different version than what im using or if i have failed to install the nightly properly. I am fairly new to scripting but i have been messing with MTA for about a year now and would really like to continue making resources and possibly even maps. Any help would be greatly appreciated and i understand if no one answers as from what i have read in other threads you need a reasonable amount of knowledge just to get nightly up and running properly. i thought i could figure it out but not so sure now Thanks Again for l king EDIT : just thought im running windows XP and i am running the server on a home network ( LAN ) with four pcs connectable but i only use 2 players when testing Pretty sure system spec is fine ( AMD Dual Core , 2 Gigs Ram ) and i have run DP 2.3 for quite a while on a much less powerful system. Also all my old resources ( some made by me and some downloaded from MTA resources page ) all seem to work fine which is what makes me think i have installed nightly wrong because i have read on the wiki that a lot of commands have changed and i was expecting lots of errors
-
i found that if u bind addupgrade1010 to a key u can switch nitro on/off quite easy with no scripting involved i use f3 for mine
-
in the DM support forum I think someone posted a little batch file to change between race and dm. they tend to overwrite the registry entries for each other and I dont think u can run them both at the same time. I would advise against trying to do this at the moment if u already have DM installed because with the serial generator down there is no way to reinstall DM if u decide to install race
-
do U need the script to replace the vehicle or the actual vehicle model. if U just need the script have a look here ( u need to scroll down a bit ) https://forum.multitheftauto.com/viewtopic.php?f=91&t=23142&p=280237&hilit=replace#p280237 as for the model GTAplace.com and GTAfiles.com will probably have it
-
if you want one made for u try the two at the bottom of this list https://community.multitheftauto.com/index.php?p=resources&s=list
-
i think the problem is that MTA are changing servers its causing all sorts of problems for people trying to install MTA but patience seems to be the only answer at the moment if you watch the news page im sure it will tell us when everything is back online http://mtavc.com/ have a look here every once in a while
-
as isaid mine works fine but any cars spawned by the map will not respawn after they are destroyed not to big a problem if everyone knows how to create vehicles oh yeah just remebered the code tab here is the function again ( should be easier to understand ) function vehicleDelete () local attachedElements = getAttachedElements ( source ) if ( attachedElements ) then for ElementKey, ElementValue in ipairs ( attachedElements ) do if ( getElementType ( ElementValue ) == "object" ) then destroyElement ( ElementValue ) --destroy any items attached to the car end end end destroyElement ( source ) end addEventHandler ( "onVehicleExplode", getRootElement(), vehicleDelete ) --on vehicle explode send vehicle u might want to look at this as another way round it function consoleChangeVehicle (player, command, id ) if ( id ) then local newcar = tonumber ( id ) local oldcar = getPlayerOccupiedVehicle ( player ) setVehicleModel ( oldcar, newcar ) else outpuChatBox ( "no car id", player ) end end only works with id numbers at the moment but when in a car just type command and id number and car model changes no need to spawn more cars just stay in the 1 u got
-
sorry forgot about the code tab thanx for the help though EDIT : awesome works perfect thank u very much
-
hope i didnt offend or sound like i was complaining ioncannon script is amazing and seems to work quite well even though server reports errors it doesnt seem to be a problem THANX FOR THE HARD WORK RANSOM
-
sweet thank u very much will give it a go EDIT : seem to be having trouble with the syntax should i put this within the spawn function or run it as a separate function it seems to be a problem with this local spawn_skins = { 16, 33, 61, 164, 165 } EDIT 2 : sorry i just noticed i had some of the characters wrong but have got them right now no longer gives an error but just uses default cj skin now this is from the broph script and i think ive got it setup right but i guess not function spawnThePlayer ( player ) local b = spawnPlayer ( player, -711+randInt(1,5), 957+randInt(5,9), 12.4, 90 ) local spawn_skins = { 16, 33, 61, 164, 165 } local rnd = randInt( 1, #spawn_skins ) if not b then spawnThePlayer ( player ) setPlayerSkin( player, spawn_skins[ rnd ] ) return end fadeCamera(player,true) end
-
HELLO i am trying to define what skins are randomly chosen when u spawn a player i only like about 20 - 25 of the skins and would like to use just them i use broph/fr gamemode and i have found the spawnpoint but i can only set it to choose between a single range of numbers EG : 10 - 20 / 21 - 30 and so on what i want to do is set 16, 33, 61, 164, 165, and so on im not sure how to put this into the line i can use the randInt command but it only seems to accept two numbers to create skins i really want to be able to set individual numbers into the field so it will only spawn with the skins i set but still at random
-
ive got this one running but it does give some errors it says it was written by RANSOM does give errors in the server window here u go --===================================================================================================================== --Start defining varibles, including a players array. I defined players array in both scripts incase they are seperated --===================================================================================================================== root = getRootElement () players = {} outputChatBox ( "Ion cannon by Ransom" ) ion_rotx = 0 ion_loops = 0 ion_explosionTimer = 0 ion_cannonActivated = false ion_cancelActivation = false ion_beamSize = 5 ion_beamFlareSize = 5 ion_lauchbutton = "i" players = getElementsByType ( "player" ) --============================================================================================================== --Give all players on the server access to the weapons --============================================================================================================== function ResourceStartIonCannon ( name, root ) if name ~= getThisResource() then return end for k,v in ipairs ( players ) do -- for all players in the "players" array bindKey ( v, ion_lauchbutton, "down", placeIonCannonBeacon ) -- bind the key f for triggering the ion cannon end end addEventHandler ( "onResourceStart", root, ResourceStartIonCannon ) function ionPlayerJoin () bindKey ( source, ion_lauchbutton, "down", placeIonCannonBeacon ) --if a player joins after the resource loaded, bind their f key to trigger the ion cannon also end addEventHandler ( "onPlayerJoin", root, ionPlayerJoin ) --========================================================================================================================== --When the ion cannon key is pressed, show the mouse cursor that will allow the triggering of the onPlayerClick function --========================================================================================================================== function placeIonCannonBeacon ( player, key, state ) if ( ion_cannonActivated == false ) and ( ion_cancelActivation == false ) then -- and ( nuke_cancelActivation == false ) and ( nuke_cannonActivated == false ) then --These conditions prevent triggering the same weapon twice or triggering the other weapon at the same time. --Both weapons cannot be triggered because explosions are stretched to the limit, explosions would be random defineLaunchType = key --This is used later on the onPlayerClick function to tell it what weapon to launch showCursor ( player, true ) ion_cancelActivation = true else if ion_cancelActivation == true then showCursor ( player, false ) end --Prevents cursor from getting messed up if cursor is show for f or g and the opposite key is hit ion_cancelActivation = false --ion_cancelactivation is true when the cursor is showing. This is necessary along with asking if the actual --weapon is active to prevent problems with the cursor and weapon activation between both weapons and themselves. if ion_cannonActivated == true then outputChatBox ( "Ion cannon has already been activated", activator ) end --This statement says that if the ion cannon is already in use, display a meassage about it being in use on f press. --Else, if the above conditions were not satisifed and the nuke is not active, it meant the ion cannon was --active. Therefore, display the other message that both weapons cannot be used at the same time. end end --========================================================================================================================= --When the player clicks the mouse cursor, decide if the ion cannon is supposed to be launched and if so, set up the launch --========================================================================================================================= function playerClick ( button, state, clickedElement, x, y, z ) if defineLaunchType == ion_lauchbutton then --If the player clicked, we check if the key is equal to f or g. This will dictate which onPlayerClick function --commences between the ion cannon and nuke scripts ion_cancelActivation = false --Since the weapon is now in use, you have no chance to abort by pressing the key again, therefore this is false defineLaunchType = nil --This must be reset to nil so it will not fire the ion cannon next time on click if g was pressed instead of f (which triggers nuke) ion_beaconx = x ion_beacony = y ion_beaconz = z --Set the ion cannon beacon (detonation spot) coordinates to the spot the mouse cursor clicked on the game map local playerz, playerz, playerz = getElementPosition ( source ) --For the above line, getElementPosition outputs 3 varibles, but I only want z so I overwrote 1 varible called --playerz as the function went through and assigned the XYZ values to varible x, varible y, and varible z respectively. if ( button == "left" ) and ( state == "down" ) and ( ion_cannonActivated == false ) then --When the left mouse button is pressed down (not when released), if ion cannon is not active then ion_cannonActivated = true --Set this varible to true, which will be used to avoid double launches & double weapon usage showCursor ( source, false ) --Weapon beacon was chosen and the launch is initiating to that point. Hide cursor. ionBeam = createMarker ( ion_beaconx, ion_beacony, ion_beaconz, "checkpoint", 5, 255, 255, 255, 255 ) ionBeam2 = createMarker ( ion_beaconx, ion_beacony, ion_beaconz, "checkpoint", 5, 255, 255, 255, 255 ) ionBeam3 = createMarker ( ion_beaconx, ion_beacony, ion_beaconz, "checkpoint", 5, 255, 255, 255, 255 ) ionSecondaryBeam = createMarker ( ion_beaconx, ion_beacony, ion_beaconz, "checkpoint", 5, 255, 255, 255, 255 ) ionSecondaryBeam2 = createMarker ( ion_beaconx, ion_beacony, ion_beaconz, "checkpoint", 5, 255, 255, 255, 255 ) ionSecondaryBeam3 = createMarker ( ion_beaconx, ion_beacony, ion_beaconz, "checkpoint", 5, 255, 255, 255, 255 ) ionBeamFlare = createMarker ( ion_beaconx, ion_beacony, ion_beaconz, "corona", 5, 255, 255, 255, 255 ) --create six markers at the beacon point. The marker checkpoint will extend into the sky, but will end at --the given z. 6 markers are used to ensure the beam looks full as I rapidly delete and recreate the markers --in the next functions. setTimer ( ionExplosion, 50, 1 ) setTimer ( ionShot, 100, 20 ) setTimer ( ionShot2, 150, 20 ) --Trigger the functions that will create the ion cannon shot and explosion imitation. 50ms 1 time, 100ms --20 times, and 150ms 20 times respectively. else ion_activator = getPlayerFromNick ( source ) showCursor ( source, false ) --Makes sure the cursor will not show again for detonation unless the ion cannon is not active. Activator --is used to display output messages in the other functions that activations/launches arent possible. end end end addEventHandler ( "onPlayerClick", root, playerClick ) --============================================================================================================================= --Create the illusion of a beam coming from space and gradually increasing in size (beam strike power) --============================================================================================================================= function ionShot () ion_beamSize = ion_beamSize + 1 setMarkerSize ( ionBeam, ion_beamSize ) setMarkerSize ( ionBeam2, ion_beamSize ) setMarkerSize ( ionBeam3, ion_beamSize ) if ( ion_beamSize == 6 ) then setTimer ( ionShotFlare, 3, 150 ) end --The first 3 markers making the ion beam are gradually increased at +10 in 1 second. When the function has looped --6 times (6/10 of a second), the flare (again, its a corona marker but I call it a flare) grow function is triggered. end function ionShot2 () setMarkerSize ( ionSecondaryBeam, ion_beamSize ) setMarkerSize ( ionSecondaryBeam2, ion_beamSize ) setMarkerSize ( ionSecondaryBeam3, ion_beamSize ) --These beams increase at a different rate, since beamSize is changing more rapidly in the ionShot function. They stay --a little smaller than the main 3 markers and assist the "grow" look while keeping the beam visible while the markers --change size. end function ionShotFlare () ion_beamFlareSize = ion_beamFlareSize + 1 setMarkerSize ( ionBeamFlare, ion_beamFlareSize ) --Every 3ms for 150 loops, the flare size increases. This makes a large glow that appears to be caused by the beam's light end function ionExplosion () if ion_explosionTimer == 0 then --We set this value when the script started. I do so I can keep looping through this function without --resetting it. setTimer ( ionExplosion, 170, 18 ) --Trigger this function to initiate 18 times in 170ms intervals. ion_explosionTimer = 1 --Set the explosion timer flag to 1 so it is not done again with the looping (could have been true/false) else r = ion_beamSize --min/max blast radius: 1.5-28 --r will serve as our explosion radius. For the ion cannon, the explosions coming from the ion cannon --will gradually increase distance from the center point in a circular motion, since I defined r as --ion_beamSize, which is gradully increasing in size in the ionShot function at the same time. angleup = randInt(0, 35999)/100 --Choose a random angle. A value between 0 and 35999 is divided by 100 because we want --to have 2 random decimal places for as well, rather than just a whole integer. explosionxcoord = r*math.cos(angleup) + ion_beaconx explosionycoord = r*math.sin(angleup) + ion_beacony --The x and y coordinates of the explosion will occur at a max radius of r away from the nuke beacon, --in a circular shape. This is a fundamental, simple circle geometry formula. createExplosion ( explosionxcoord, explosionycoord, ion_beaconz, 7 ) --An explosion of type 7 is created, which is the tied as the largest with some others it is --an aircraft explosion. ion_loops = ion_loops + 1 if ion_loops == 16 then --on the 16th loop of this function --ion_beamFlareSize = 200 --This triggers the flare to grow +50 immediately right as the beam is ending to create a little --larger flash, just for effect as the beam is done --setTimer ( ionFlareFade, 5, 200 ) --The flarefade function is set to occur 200 times at 5ms to set the flare size to 0 quickly, as --the beam has disappeared --skip the above, it doesn't work. Just get rid of the flare destroyElement ( ionBeamFlare ) ion_cannonActivated = false ion_beamFlareSize = 0 elseif ion_loops == 18 then --on the 18th loop of this function ion_explosionTimer = 0 --Set the explosion timer to 0 for the next ion cannon launch, since this is the last loop ion_loops = 0 --Set to 0 to trigger these events directly above on next ion cannon launch as well ion_beamSize = 5 --Set to 0 to trigger the functions properly on the next ion cannon launch destroyElement ( ionBeam ) destroyElement ( ionSecondaryBeam ) destroyElement ( ionBeam2 ) destroyElement ( ionSecondaryBeam2 ) destroyElement ( ionBeam3 ) destroyElement ( ionSecondaryBeam3 ) --Destroy all the created checkpoint marker elements that made the beam end end end function ionFlareFade () setMarkerSize ( ionBeamFlare, ion_beamFlareSize ) ion_beamFlareSize = ion_beamFlareSize - 1 if ion_beamFlareSize == 0 then destroyElement ( ionBeamFlare ) ion_cannonActivated = false ion_beamFlareSize = 5 end --Each time the function loops, the flare gets -1 smaller. When it has a size of 0 and becomes invisible, it needs --to be deleted for the next ion cannon launch. No elements should stay created as they will pile up and eventually --crash you or the server. Finally, ion_cannonActivated is false, meaning the ion cannon is inactive and another --weapon use can be performed. end like i said watching the server window while other people are using it does report lots of errors but it works i have set it up as a separate script and just put a in the meta.xml
-
have finally got it u were right TMA dont know what i was doin just put the line in a script by itself and run it as client through the meta sweet
-
i would suggest using the one from TMA as i have chatted to him on the forums before and he really seems to know what hes doin as he said the script i posted is more complicated because on my server i have a number of attach element commands goin on so all u need to get rid of cars is TMAs script also oneproblem with my script is that when a car blows it doesnt respawn even if its set to spawn by the map file EG: i use broph/fr and there are a number of vehicle round the spawn point when u start but if u destroy them they dont come back . i am currently trying to fix this problem but it may be awhile before i figure it out . i hope i will be able to get elements attached to player and just destroy those but we will see
-
this is really wierd i have tried it as 2 seperate scripts one server and one client then i tried adding the function to my main script and made a client script then i tried every different form of syntax i could think of both in the main script and as a seperate one then i tried to make it a console command now i dont know what else to try it looks so simple on the wiki but just cant stay on the bike i even wondered if it was something silly like one command for bikes and one for motorcycles but no ANYBODY OUT THERE HAVE ANY IDEAS this ones doing my head in
-
SWEET THANX ill give it a go EDIT : not sure how to make it a client script i have made it a resource on its own and set it as type="client" mta says resource loaded but with errors sorry to be a pain but ive only just started scripting so im still kinda dumb
-
does that mean i have to set it as type=client or i dont need to set it as a function sorry if dumb question still learning i know it looks really simple but ive tried function cantfall ( player ) setPlayerCanBeKnockedOffBike = false and function cantfall ( player ) local player = getLocalPlayer setPlayerCanBeKnockedOffBike ( player, false ) and a few others but none seem to work
-
i use the BROPH and FR resources the createvehicle function in the script has toggleVehicleRespawn in it but im not sure if thats what makes them respawn probably worth a l k though hope it helps function consoleCreateVehicle ( player, commandName, first, second, third ) if ( player ) then local id, x, y, z, r, d = 0, 0, 0, 0, 0, 5 local plate = false r = getPlayerRotation ( player ) x, y, z = getElementPosition ( player ) x = x + ( ( math.cos ( math.rad ( r ) ) ) * d ) y = y + ( ( math.sin ( math.rad ( r ) ) ) * d ) if ( third ) then id = getVehicleIDFromName ( first .. " " .. second ) plate = third elseif ( second ) then if ( getVehicleIDFromName ( first .. " " .. second ) ) then id = getVehicleIDFromName ( first .. " " .. second ) else id = getVehicleIDFromName ( first ) if ( not id ) then id = tonumber ( first ) end plate = second end else id = getVehicleIDFromName ( first ) if ( not id ) then id = tonumber ( first ) end end local veh = false if ( plate == false ) then veh = createVehicle ( id, x, y, z, 0, 0, r ) --toggleVehicleRespawn ( veh, false ) --------------------- HERE else veh = createVehicle ( id, x, y, z, 0, 0, r, plate ) --toggleVehicleRespawn ( veh, false ) --------------------- HERE end if ( veh == false ) then outputConsole ( "Failed to create vehicle.", player ) end end end
-
the mta wiki just doesnt seem to help with this one and i cant figure out the syntax i just need an example of how to use it i have tried a number of different ways but thet dont work ANY HELP GREATLY APPRECIATED Thanx for l king
-
hello TMA id like to know where toggle vehicle respawn is defined ive been through the script but i cant seem to find it and id like to see how it works i assume its possible to write an extra createvehicle function without respawn so when u spawn a car from the .map file it will continue to respawn but when you use it as a console command it wont Thanx for L kin EDIT : sorry just realized how dumb that question is ( just look at MTA classes on the wiki ?