Jump to content

heavy air

Members
  • Posts

    121
  • Joined

  • Last visited

Everything posted by heavy air

  1. i have the same problem u might want to try this 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 i found this in the forums but i havent had a chance to test yet i think it will do what u want EDIT : just gave it a quick test and so long as vehicle explodes doesnt respawn ( spawned a sanchez then blew it up with minigun and it didnt reappear )
  2. first i forgot to say you must type stopall in server window before you start broph that might sort it if not try next sorry man no MSN in mta server directory look for \mods\deathmatch\then edit acl.xml should be like this -------- put your username instead of heavyair then edit accounts.xml 0 ------- put your username instead of heavyair and password if u want that should give u admin access in the server window but in game u need to open console and type login "your username" "your password"
  3. thanx buddy i thought i had the syntax for timer right going by the mta wiki ill give it a try now Have just tried it and mostly works but still get bad argument for set timer ramp spawns / vehicle boosts / vehicle changes but all at the same time usually end up destroying the plane because it hits the ramp will keep tryin and see what i can figure out still not sure what i did wrong in the syntax for timer on the mta wiki it says optional argument should be at end of line and i thought thats where i should put the vehicle id thanks for the help again JUMBA u really know your stuff THANX AGAIN EDIT : got it workin function launch ( player, command ) local x, y, z = getElementPosition ( player ) local theVehicle = getPlayerOccupiedVehicle ( player ) local a,b,r = getVehicleRotation ( theVehicle ) x = x - math.sin ( math.rad® ) * 20 y = y + math.cos ( math.rad® ) * 20 ramp = createObject ( 1633, x, y, z, 0, 0, r ) setTimer ( RemoveRamp, 999999, 1, ramp ) local veh = getPlayerOccupiedVehicle ( player ) local vx, vy, vz = getElementVelocity ( veh ) setElementVelocity ( veh, vx*10, vy*10, vz*10 ) setTimer ( setVehicleModel, 500, 1, theVehicle, 511 ) end function RemoveRamp (ramp) destroyElement(ramp) end need to reduce the speed boost a bit though / when your drivin fast car tends to flip and plane spawns upside down THANX for the help once again JUMBA u rock
  4. Hi Every body i have working on this function function launch ( player, command ) local x, y, z = getElementPosition ( player ) local theVehicle = getPlayerOccupiedVehicle ( player ) local a,b,r = getVehicleRotation ( theVehicle ) x = x - math.sin ( math.rad® ) * 20 y = y + math.cos ( math.rad® ) * 20 ramp = createObject ( 1633, x, y, z, 0, 0, r ) setTimer ( RemoveRamp, 999999, 1, ramp ) local veh = getPlayerOccupiedVehicle ( player ) local vx, vy, vz = getElementVelocity ( veh ) setElementVelocity ( veh, vx*10, vy*10, vz*10 ) setTimer ( setVehicleModel, 10, 1, "511" ) end what i want to do is spawn a ramp / jump it really fast ( to get airborne ) / and turn into a plane ( used setTimer so it would change vehicle once im airborne the ramp and the speed up work fine but it doesnt change vehicle i have tried calling another change vehicle function i nthe script but that didnt work either ANY IDEAS Thanx for Lookin
  5. Just got this workin function setvehiclealpha (player, command, level ) local veh = getPlayerOccupiedVehicle ( player ) setElementAlpha ( veh, tonumber ( level ) ) end awful simple i know but im getting somewhere at last anybody is welcome to use this and alter any way they want slight problem though makes all cars of its type invisible as well thanx for the help all and hopefully ill be onto gamemodes in a month or two still lovin the pirate ship idea but i think ive got a fair way to go before i can make that i think im going to try for a command that sets player and vehicle alpha together next
  6. the best way ive found to solve this IS : start mta server / dont start mta dm yet in server window type stopall ( all one word ) then type start broph then type fr should give you full map freeroam hope it helps
  7. ive never used lua before and i really dont remember much of my basic / pascal days thats why i want to get to know this stuff sorry if i seem a bit dumb sometimes but it has been a very LONG time but i keep going through the tutorials and such trying to remind myself Thanx for posting
  8. on another note i am trying to make a vehicle invisible i am basing my script on set player alpha level (function ElementAlpha) and the change vehicle script that i made with the help of FGWELDER and JUMBA this is where i am function vehicleAlpha ( source, command, level ) local vehicle = getPlayerOccupiedVehicle ( source ) local alphalevel = getElementAlpha ( source ) setElementAlpha ( localvehicle, tonumber ( level )) end end and i get this error 17:36:04] SCRIPT ERROR: C:/MTA Server/mods/deathmatch/resourcecache/hafr/heavyair.lua:48: '' expected near 'end' [17:36:04] INFO: Loading script failed: C:/MTA Server/mods/deathmatch/resourcecache/hafr/heavyair.lua:48: '' expected near 'end' not sure where im goin wrong or if this is even possible but i find i learn best by doing i think i just need a push in the right direction
  9. WOW that is awesome and just what i wanted i really want to learn scripting so i can do what i want but its awful hard last time i was into programming i was on pascal and visual basic at college but that was about 12 years ago and im struggling to get back into it i have been through all the tutorials and such but they just dont seem to click ( i really really want an ion cannon) i will have a proper look this evening and see where i can get THANX LOADS i think this should be quite helpful ONCE AGAIN THANX A BUNCH EDIT : just had a little play with it and have mounted a rocket on car but still having problems firing ( not to big a problem as its just for the look ) still not totally sure what im doin but im going to try and expand a little ( multiple rockets ) your guide was very helpful though and i think im getting somewhere at last U R AN ANGEL THANX SO MUCH
  10. EDIT : have found some help in another thread but thanx for looking i have seen weapons mounted on vehicles in interstate69 mode and would like to do this in freeroam game (trying to do MADMAX like movie) i have studied the wiki and the interstate scripts but im not getting very far any ideas would be appreciated so far i have tried to use attach element to element but the scripts in interstate are very confusing as the vehicle spawns seem to be separated between all of the resources i will only be using this option on my server (to make movies) not looking for an advantage over other players dont see the point of cheating in multiplayer i was also considering increasing the world size in interstate so i can use whole map but im still trying to figure out how to do that (Once again any ideas appreciated) THANX ALL
  11. heavy air

    Help

    hell of a pain to do it but is only way ive found so far drive to the place u want the vehicle to spawn in the vehicle u want to spawn there open console (f8) type getpos result is x,y,z position and x,y,z rotation in that order write all these down and if u are using broph and fr resource u need to open broph resource with winrar then open broph.map and u will see all the vehicle spawns there just copy the syntax each vehicle should be in one line i have tried a script from the forums that is supposed to save your position to a txt file for you but i havent got it workin yet (i think im doin something wrong) will let u know if i get it goin HOPE THIS HELPS
  12. thats a pretty sweet idea what about the turret from the rhino as the basis for movement i have been looking in the interstate69 scripts again and i think im getting somewhere ive started with get player occupied vehicle for the x y z then attach element to place the gun but im getting a bit lost im a very noob scripter and have just begun learning in the interstate69 scripts the vehicle spawn with weapon seems to be split between lots of different scripts and im struggling to piece it all together into one function i dont know if i can make it a function to add the weapon with command or if ill have to make it as a spawnpoint vehicle when u start interstate69 it gives u the option to pick weapons where as i just want a single weapon mounted on the vehicle (allways minigun) trying to make a bit of a madmax movie i was considering just increasing the world size in interstate69 so i can use the whole map but i think that will take quite some time so it might be a while will post updates if i make any progress
  13. EDIT : have managed to solve problem on another thread thanx for l king though hello i have been trying to set what skins are used when you spawn in broph/fr there are about 20 skins i want to use but i dont know how to set them i have looked at the WIKI but it doesnt seem to help any ideas appreciated i found what i thought was the spawnpoint script in fr but im not sure what to change i dont want to add any new skins just set which ones it uses to my favourites
  14. is it possible to mount guns on cars ala interstate69 but in a freeroam map i have looked throuh the scripts for interstate69 but cant figure out what i need to do is it just a case of using attachelement (but then how do i fire) or something more complicated ANY HELP s APPRECIATED
  15. one other thing i had to do was stop the router automaticaly setting the ip what you have to do is login to your router and find dhcp settings IP address : . . . 192.168.2.1 IP Subnet Mask : 255.255.255.0 DHCP Service : Enabled Disabled Lease Time (sec) : Half hourOne hourTwo hourHalf dayOne dayTwo dayOne weekTwo weekForever IP address pool Start IP : . . . 192.168.2.2 End IP : . . . 192.168.2.7 Domain Name : this is what mines like you need to set a number of ip addresses outside the dhcp so when you turn the pc on the router wont change your ip on mine i need 4 PCs to run gta so i cleared 192.168.2.2 to 192.168.2.7 then if you go to network connections and right click your connection again but go into properties this time then go into properties of internet protocol TCP/IP all the settings you need are on the main login page of your router (subnet mask, default gateway, dns server 1 and 2) just fill them in and pick an ip address that you set in the router going from above you would use 192.168.2.2 or.3 or .4 and so on hope thats not to confusing
  16. u need to go into start\control panel\network and internet connections\network connections right click your connection \ click status \ click support tab \ your ip address is second line
  17. try setting the ip address to the one given to you by the router if youve allready done that and your on windows xp you can set the router to give you a static ip address
  18. I have found this speed boost script function speed(source) local vehicle = getPlayerOccupiedVehicle(source) x, y, z = getElementVelocity(vehicle) setElementVelocity(vehicle, x*10, y*10, z*10) end addCommandHandler("speed", speed) the way i use it is to put the command into ctvdebug.lua in broph resource with notepad i dont know if it will help or not u have to be careful when u use it ( VERY FAST ) BUT IF U CHANGE X*10, Y*10, Z*10 to lower values it should be more controllable also boost depends on how fast u r going and what vehicle your in still doesnt make u jump but its half way there Perhaps if you added a rotational element you could get it to boost upward as well rx*10 ry*10 rz*10 but im not sure which one is up
  19. Thanx friend will see what it is now THANX AGAIN EDIT : Nice ramp man any idea what the loop de loop ramp id is?
  20. A_mazing my friend works perfect and even keeps the same colors THANK U VERY MUCH!!!!!!!!!!!!!!!!!!!! confused my self a bit in my scripti was basing my script on the createvehicle command and didnt realize getoccupiedvehicle would give me all the position data for the new vehicle
  21. I have tried writing the function according to this but i just cant get the syntax right i am very new to scripting and really dont know what im doing tbh so far ive been able to look at the way things are donr in other scripts and figure out what i need to write to get the effect i want but this ones really difficult for some reason thanx for the help though i am still workin on it and will post if have any progress THANX AGAIN edit: is this even close function consoleChangeVehicle ( player, command, id ) if ( player ) then local = getPlayerOccupiedVehicle x, y, z, rx, ry, rz x, y, z = getElementPosition ( player ) rx, ry, rz = getVehicleRotation ( player ) then setVehicleModel ( player, id ) end end
  22. Hello i am trying to create a console command that lets me change vehicle model while in the vehicle EG. buffalo - ibto - AT400 i have managed to add speed boost, stick to vehicles and spawn ramp commands but i just cant figure this one out mostly i borrow and edit scripts from other resources in mta but i cant seem to find anything that does this i have also tried using createpickup to set a vehicle change pickup but i dont know what the ID number is ANY HELP OR IDEAS GREATLY APPRECIATED
  23. Hello i have managed to put quite a few new functions into my server but i just cant get this one goin i want to be able to change the vehicle im in with a console command eg. Buffalo - into - AT-400 i have managed to get a ramp spawner, speedup and stick to vehicles so far but i cant figure out how to do a change vehicle function ive tried using the map converter but it doesnt put checkpoints into the map so thats no good would anyone be willing to share there script or guide me in the right direction so far i have just borrowed and modified scripts from the mta resources and a lot of help from the forums and the WIKI but i just cant figure this out any ideas greatly appreciated EDIT : have found the solution with help on another thread thanx for looking and just ask if u need the script
  24. i put my username entry one line from the last and it seems to work that way (look out below)
×
×
  • Create New...