BinSlayer Posted September 1, 2010 Posted September 1, 2010 (edited) Hello to all the map-makers out there I'll post some scripts I have that can make your map more fun/enjoyable.1) Checkpoint boosting.We all know checkpoints can change your vehicle and advance you through the race, but let's give it another usage for the crazy rollercoaster maps out there! We can have the checkpoints give you a lil' boost (adjustable speed) to each racer that goes through it. Here's the script I made to do this:local multiplier = 1.4 -- Change this to suit your needs (recommended: 1.4). If using higher values don't put many checkpoints or the server will think it is cheating (warping)function boost() local theVehicle = getPedOccupiedVehicle(source) if theVehicle then local speedx, speedy, speedz = getElementVelocity(theVehicle) setElementVelocity(theVehicle, speedx*multiplier, speedy*multiplier, speedz*multiplier) end endaddEvent("onPlayerReachCheckpoint", true) addEventHandler("onPlayerReachCheckpoint", getRootElement(), boost) To use this script in your map, copy-paste everything into a .lua file such as speedboost.lua and put it in the map archive. Then edit your meta.xml to add the following: <script src="speedboost.lua" /> Also, do test the map WITH the script before you send it to us and if the speed doesn't please you, change the multiplier value. Ranges like from 1.1 to 1.8 or so 2) Handling script.This script was made by [sKC]Plodders. What it does is modify the handling of any vehicle in your map. Actually, it sort of gives it more speed, very useful for cirtcuit race tracks as it also drifts nicely.To use it: go here http://www.xoti.net/stuff/uploads/handling_15ed.lua . Then copy paste everything into a new lua file preferably handling.lua which will be put in the map archive along with the .map and .xml . Then modify meta.xml so it loads up the script: <script src="handling.lua" type="client" />3) Flying cars and the ability to drive on water (Vice City style) - same script for both of these featuresActivate/Deactivate it by pressing 1 (for flying) and 2 (for driving on water) . You can trigger this at anytime during the race.To use it: go here http://www.xoti.net/stuff/uploads/flying_7b1b.lua . Save everything as flying.lua and add it to your map archive file. Then open meta.xml and make the required change: <script src="flying.lua" type="client" />UPDATE for flying cars script. Now shows ON or OFFMaybe I'll add some more as I make/find interesting stuff. Edited September 2, 2010 by BinSlayer Quote
BlueYoshi97 Posted September 1, 2010 Posted September 1, 2010 Thank you so much! Not so long ago I spent my whole time searching for the flying cars ability in MTA but I thought it wouldn't be possible. Same for water cars.A small script for you, a big step for mankind! Quote
BinSlayer Posted September 1, 2010 Author Posted September 1, 2010 (edited) 4) Drive-bys for your race maps. Description: this script gives each player who passes through the first checkpoint a gun with 50 rounds to shoot others. If the ammo runs out, well, just get the 3rd checkpoint. This will remove your gun and add a TEC-9 sub machine gun with 100 rounds. Then on the 6th you get a refill for it, then on the 9th CP.. and so on.. Basically, every third one These are just some values I thought were suitable but you can change these as you please in the script code. To use it: get the script from here: http://www.xoti.net/stuff/uploads/weapon_acfd.luaSave everything as weapons.lua (in your map archive file), then make the change in meta.xml: <script src="weapons.lua" /> hope it helps EDIT: Updated. So it also shows what weapon you have exactly and the ammo Edited September 2, 2010 by BinSlayer Quote
BinSlayer Posted September 2, 2010 Author Posted September 2, 2010 heh thanks hope to see this babe in action, it'll be a WAR RACE xD Quote
BinSlayer Posted September 6, 2010 Author Posted September 6, 2010 5) Made by WojakRace Hunter. What this does is basically add a hunter (a bot) that automatically detects the first player of the race and tries to kill him with rockets. (Don't underestimate it, it's very accurate ) Download here: http://www.xoti.net/stuff/uploads/race_huntbot_9c78.zipTo use it in your map, extract the 2 LUA files and put them INSIDE your Map Archive.Edit meta.xml so it adds these 2 lines: <script src="hunt_cl.lua" type="client"/> <script src="hunt_s.lua" type="server"/> Quote
BinSlayer Posted September 26, 2010 Author Posted September 26, 2010 (edited) 6) Blur scriptThe GTA San Andreas motion blur is a feature which makes your screen blurry while you are driving at high speed. Having this blur could be annoying in most maps, so we have it disabled.However, you've built a map and you think the blur would be a nice addition to it? Go here:http://www.xoti.net/stuff/uploads/blur_4fb5.luaSave all codes as blur.lua then put the file in your map archive. Open meta.xml and add this line: <script src="blur.lua" /> right before the </meta> tagIt'll make your map have blur Note: default blur level is 25. You can put anything from 0-255 , but it's not recommended Edited September 26, 2010 by BinSlayer Quote
BlueYoshi97 Posted September 28, 2010 Posted September 28, 2010 Hey, is it possible to have a Flying Boats-script? Quote
Cookie Posted September 28, 2010 Posted September 28, 2010 Hey, is it possible to have a Flying Boats-script?Well, there is a cheat to do that, so I think it's possible, but I'm not the master script0r here Quote
WeskeR Posted September 29, 2010 Posted September 29, 2010 How I can put music on the map ?Greetings Quote
BinSlayer Posted September 29, 2010 Author Posted September 29, 2010 How to add custom vehicles and custom music to mta map:Greetings Quote
Mr. Darkness Posted September 29, 2010 Posted September 29, 2010 Looks helpful. I'll try to make some maps for MTA too... But need to learn how to use MTA sdk first. Quote
CsenaHUN Posted October 1, 2010 Posted October 1, 2010 (edited) You can create vehicle with collision:Script:function vehicles () theVehicle01 = createVehicle( 596, -2565.5588378906, 1101.1065673828, 55.387321472168, 0, 0, 340.5) ---create the policecar ped01 = createPed ( 280, 0, 0, 0 ) ---create the policeman warpPedIntoVehicle ( ped01, theVehicle01 ) ---send him into the car setElementData ( theVehicle01, 'race.collideothers', 1 ) ---set the car collision on setVehicleEngineState ( theVehicle01, true ) ---turn the engin on setVehicleSirensOn ( theVehicle01 ,true ) ---turn the siren on setVehicleOverrideLights ( theVehicle01, 2 ) ---turn the light on theVehicle02 = createVehicle( 596, -2563.3388671875, 1108.3162841797, 55.387321472168, 0, 0, 340.5) ped02 = createPed ( 280, 0, 0, 0 ) warpPedIntoVehicle ( ped02, theVehicle02 ) setElementData ( theVehicle02, 'race.collideothers', 1 ) setVehicleEngineState ( theVehicle02, true ) setVehicleSirensOn ( theVehicle02 ,true ) setVehicleOverrideLights ( theVehicle02, 2 ) theVehicle03 = createVehicle( 596, -2559.3916015625, 1119.3482666016, 55.387321472168, 0, 0, 340.5) ped03 = createPed ( 280, 0, 0, 0 ) warpPedIntoVehicle ( ped03, theVehicle03 ) setElementData ( theVehicle03, 'race.collideothers', 1 ) setVehicleEngineState ( theVehicle03, true ) setVehicleSirensOn ( theVehicle03 ,true ) setVehicleOverrideLights ( theVehicle03, 2 ) theVehicle04 = createVehicle( 596, -2557.0859375, 1125.9329833984, 55.387321472168, 0, 0, 340.5) ped04 = createPed ( 280, 0, 0, 0 ) warpPedIntoVehicle ( ped04, theVehicle04 ) setElementData ( theVehicle04, 'race.collideothers', 1 ) setVehicleEngineState ( theVehicle04, true ) setVehicleSirensOn ( theVehicle04 ,true ) setVehicleOverrideLights ( theVehicle04, 2 )endaddEventHandler("onResourceStart", resourceRoot, vehicles)meta.xml <script src="vehicles.lua" type="server" />Ped skin id: http://wiki.multitheftauto.com/wiki/Character_SkinsVehicle id: http://wiki.multitheftauto.com/wiki/Vehicle_IDsNote: If you are too far from the policecars warpPedIntoVehicle wont work. If not you can hear siren sound. Use timer for the warpPedIntoVehicle like this:setTimer(warpPedIntoVehicle, 1000, 1, ped, Vehicle ) ---1000 is milisec (1 sec) Edited October 1, 2010 by CsenaHUN Quote
WeskeR Posted October 1, 2010 Posted October 1, 2010 (edited) What's that code ?Oh, now i see Edited October 2, 2010 by WeskeR Quote
BinSlayer Posted October 2, 2010 Author Posted October 2, 2010 (edited) 7) Driving on walls(similar to no-gravity)To use it in your map:Go here: http://www.xoti.net/stuff/uploads/magnetwheels_client_f559.luaSave all codes as magnet.luaPut magnet.lua in your map-archive. Edit meta.xml and add this before the </meta> tag:<script src="magnet.lua" type="client" />To test it: Play the map "Race Turbolar" as it uses this script.Note. Original script taken from here: http://community.mtasa.com/index.php?p=resources&s=details&id=329 Edited October 2, 2010 by BinSlayer Quote
CsenaHUN Posted October 2, 2010 Posted October 2, 2010 Is this new version works fine? I tryed the magnetwheels script, but the camera was so wierd. Quote
BinSlayer Posted October 2, 2010 Author Posted October 2, 2010 Is this new version works fine? I tryed the magnetwheels script, but the camera was so wierd.the camera is weird because it's how GTA worksI doubt it can be fixed with scriptingbut it's not so bad.. it's Ok I think Quote
FOTL.Emanuel Posted October 2, 2010 Posted October 2, 2010 Just drive with 1st person camera, thats how I did the current record. Quote
BinSlayer Posted October 3, 2010 Author Posted October 3, 2010 My update for driving on walls script:- It starts off as disabled.- You can enable/disable it at anytime by pressing "C"- White text on the screen that shows this featurehttp://www.xoti.net/stuff/uploads/magnetwheels_client_686d.luasame way of installing as before ^ Quote
CsenaHUN Posted October 6, 2010 Posted October 6, 2010 Trial script.http://community.mtasa.com/index.php?p=resources&s=details&id=430 Quote
BlueYoshi97 Posted October 6, 2010 Posted October 6, 2010 Trial script.http://community.mtasa.com/index.php?p=resources&s=details&id=430*video*That looks really cool. Quote
BinSlayer Posted October 6, 2010 Author Posted October 6, 2010 I guess we can run the trials script on certain maps but it ain't good for all xD it has lots of side effects :/ Quote
SDK Posted October 6, 2010 Posted October 6, 2010 (edited) On yoshi's request, I made the script you know from his turtle + dolphin maps more flexibleChange the replacements on the first lines, currently it replaces a few fast cars with some animals, lemme know if it's bugged.(serverside)local replacements = { [451] = 1607, -- Turismo -> Turtle [541] = 1608, -- Bullet -> Shark [411] = 1609 -- Infernus -> Dolphin -- [vehicle_id] = [object_id]}local obj = {}addEventHandler ( "onPlayerVehicleEnter" , getRootElement(), function(veh) if obj[source] then return end if tonumber(replacements[getElementModel(veh)]) then setElementData( source, "overrideAlpha.alpha", 0, false ) local vx, vy, vz = getElementPosition ( veh ) local rx, ry, rz = getVehicleRotation ( veh ) obj[source] = createObject (tonumber(replacements[getElementModel(veh)]), vx, vy, vz, rx, ry, rz) attachElements ( obj[source], veh, 0, 0, 0, 0, 0, 0 ) endend)addEventHandler ( "onResourceStop", getResourceRootElement(), function() for k,v in ipairs(getElementsByType('player')) do setElementData( v, "overrideAlpha.alpha", nil, false ) endend) Edited October 6, 2010 by .:SDK:. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.