
Transom
Members-
Posts
54 -
Joined
-
Last visited
Everything posted by Transom
-
I think I put that in trying to make it work. It still didn't work though. Hmmm. I'll try looking around for the new script.
-
Is it just me or is there something wrong with the ion cannon script. Do I have to add something to this: <meta> <info author="author" description="The ion cannon" /> <script src="ioncannon.lua" /> </meta> --===================================================================================================================== --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 Can I leave it as it is or do I have to add something to it, because on the Mtaserver.exe thingy, it says ion cannon resource failed to load.
-
Yeah thats the one. Bunch of morons ... That is another one as well. Why don't they just accept the server doesn't allow weapons, modified handling etc. But no, they have to deny when it is written across their face. Grrr. It really makes me angry.
-
Its changed now. Or should I say moved. The forum address is: freeroam.alienxsoftware.co.uk I am helpful aren't I.
-
I hate hackers. They can all burn and rot in hell. The little feckers ... Why people have to hack fries me. And then, when they do hack and are caught its "Noooo i isn't hax0r i stupid so must use cheats i suck im n00b tosser" etc, etc (fine I made some of that up, does it matter ... ). Some people really must have their heads lodged too far up their arses. Seriously, some people couldn't find their anus with two hands and a flashlight ... Bunch of tossers. I hate hackers. Rant over.
-
Personally, Ithink it is a load of old shit but anyway .... Anyone get sent a card of some red roses or like me, get sent f*ck all.
-
Ain't someone going to get a birthday cake. I would but .... alas, I cannot be f*cked.
-
i have this "error" too if i put my username under supermoderator it, or to Admin, i cant open the admin panel... sorry im noob in this... here is my acl.xml (not all) <group name="SuperModerator"> <acl name="Moderator"/> <acl name="SuperModerator"/> <object name="user.[imC]Rec6100"/> <object name="user.[imC]Norbert"/> </group> its ok? (sorry for my bad english, but im not from english talking land...) please help me FIXED THE PROBLEM WITH Lil_Toady's help... Sorry not to be too constructive to the topic but ... English talking land? There is lots of them mate. United Kingdom, Australia, United States, Canada etc ....
-
People can't be bothered with making maps since the easy way of making the maps (i.e. map editor) isn't available so people can't be bothered to go down the long route (i.e. erm .... making maps without using the map editor ). I was thinking of making a few maps but cannot be arsed to do it the manual way and am going to wait for the map editor.
-
how to make this only for admins, moderators etc
Transom replied to FIRESTARTER's topic in Scripting
I have been wondering if this is possible. At the moment though ... I don't think the ion cannon works. I scripted it fine and it couldn't find the resource .... (Try looking .... damn server! ). -
Yes I like that place as well. I started to find I liked people there and not long ago I became an admin. But of course I'm not that shallow (shallow .... moi? Never ... ) and don't only like it because I'm an admin. It is quite an original server and has a lot to offer (all thanks to AlienX of course ) that other servers of its kind, don't. Hence, why I like it. It is friendly and original.
-
It is nice to see you can get custom cars through scripting, hence not cheating. I hate cheaters. They are sad little people, and if you do cheat, it just proves that you are crap and can't play for toffees.
-
Never mind. I've fixed the problem. This thread can be closed now.
-
Is it just me or is this whole server lark, affecting my Windows Live Messenger or is it something else that is the problem. Because everytime I sign on, I have to Troubleshoot and it says something about Host Files. I'm just thinking this since I've never had this problem before.
-
Haha. I love the Supermarket thing as well. I also loved the Assault Sharks mode.
-
Eehhh Question: I want race back, but where can I download it? Thanks! On the Downloads page. If you go to it from the forums (link up top by news, about mta etc) then you will find the page before DM came out. However, if you find the current Downloads page, it says archived versions are held by gonnaplay.com
-
Thanks for that. I am hoping I can learn a bit more about this. I hate being new.
-
Hmmmm. I will try what was said about coordinates. Another point I thought of - would it be possible to get rid of the names and health bars of other players on a server that you see. Thanks.
-
Is there anyway to distinguish it from all the other Default MTA Servers, like changing the name, since I can't edit it directly in the MTA Server.exe window? I tried earlier and couldn't find it. Do I have to keep the MTA server window up to see it? Thanks.
-
Oh right, now I see.
-
Sorry if this seems obvious to some but I am new to it. How do you get a server visible. I have opened the MTA Server.exe thing and I can't find any sort of server in MTA to actually claim ownership over. I followed the Wiki and couldn't find anything. All I have done is I have downloaded the server kit from the downloads section, tried adding myself as an admin to the accounts.xml thing and tried to change the server name in the server document in: C:\Program Files\MTA San Andreas\server\mods\deathmatch\logs But nothing ... It seems like I supposedly have a server, but can't access it. Can anyone solve my dilemma (like I said, sorry if this is baby talk to some but I am quite new to server making).
-
Well you asked for a Mafiaish car and I gave you one.
-
Why don't you try Sentinels. After all, they were the cars the Mafia in GTAIII used.
-
go to single player /options/display you can turn it off just disable maps and blips and turn off hud mode So that works for MTA as well as SP? Hmmmm. Could try that.
-
Thanks for that. Must try those. This can be a future idea to the scripters to try and see if they can make these hidden interiors, accessible. San Fierro PD is one of these interiors, another one would be Sweet's House in Grove St and there is also other places, like the Sherman Dam etc.