wizzi Posted January 17, 2012 Share Posted January 17, 2012 Hello , i dont know to make when player spawns a vehicle with (F1-> Create) to spawn him inside the car. Please help me , and tell me wat should i edit to make it like that Link to comment
Sparrow Posted January 17, 2012 Share Posted January 17, 2012 you need to add this: warpPedIntoVehicle --warp player into the vehicle when he spawn it. Link to comment
Blaawee Posted January 17, 2012 Share Posted January 17, 2012 Your syntax is wrong function giveMeVehicles(vehicles) if type(vehicles) == 'number' then vehicles = { vehicles } end local px, py, pz, prot local radius = 3 local playerVehicle = getPedOccupiedVehicle(source) if playerVehicle and isElement(playerVehicle) then px, py, pz = getElementPosition(playerVehicle) prot, prot, prot = getVehicleRotation(playerVehicle) else px, py, pz = getElementPosition(source) prot = getPedRotation(source) end local offsetRot = math.rad(prot) local vx = px + radius * math.cos(offsetRot) local vy = py + radius * math.sin(offsetRot) local vz = pz + 2 local vrot = prot local vehicleList = g_PlayerData[source].vehicles local vehicle if ( not vehicles ) then return end for i,vehID in ipairs(vehicles) do if vehID < 400 or vehID > 611 then errMsg(vehID ..' is incorrect vehicle model', source) elseif not table.find(getOption('vehicles.disallowed'), vehID) then if #vehicleList >= getOption('vehicles.maxperplayer') then unloadVehicle(vehicleList[1]) end vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) if (not isElement(vehicle)) then return end setElementInterior(vehicle, getElementInterior(source)) setElementDimension(vehicle, getElementDimension(source)) table.insert(vehicleList, vehicle) g_VehicleData[vehicle] = { creator = source, timers = {} } warpPedIntoVehicle(source, vehicle) if not g_Trailers[vehID] then if getOption('vehicles.idleexplode') then g_VehicleData[vehicle].timers.fire = setTimer(commitArsonOnVehicle, getOption('vehicles.maxidletime'), 1, vehicle) end g_VehicleData[vehicle].timers.destroy = setTimer(unloadVehicle, getOption('vehicles.maxidletime') + (getOption('vehicles.idleexplode') and 10000 or 0), 1, vehicle) end vx = vx + 4 vz = vz + 4 else errMsg(getVehicleNameFromModel(vehID):gsub('y$', 'ie') .. 's are not allowed', source) end end end Use mta script editor or luaEdit in the freeroam file go to fr_server from line 306 to line 356 then go to the meta and change the : "*vehicles/maxidletime" value="[9999999999999999]" /> -- Time in ms before a vehicle without passengers gets destroyed --> Link to comment
TAPL Posted January 17, 2012 Share Posted January 17, 2012 lol why everyone want make like what i making in my server Link to comment
Blaawee Posted January 17, 2012 Share Posted January 17, 2012 lool tapl don't think like that Link to comment
karlis Posted January 17, 2012 Share Posted January 17, 2012 lol why everyone want make like what i making in my server this is way too general script to blame anyone for copying. Link to comment
TAPL Posted January 17, 2012 Share Posted January 17, 2012 it's not just about this script, it's when ever i make any new script in my server i can see some people asking for help here to make like what i do. examples: 1-i make a script vote maps for BaseMode from two years ago, i saw someone here asking help to make it 2-i make script anti vote flood for BaseMode and than someone has uploaded one like what i make in community 3-i make script GhostMode for BaseMode, and too i see them on community 4- i make shop in my server for BaseMode, i saw here 1594156741567 one asking for help to make like what i do(with stolen image from my shop) and many others scripts .. Link to comment
Blaawee Posted January 17, 2012 Share Posted January 17, 2012 it's not just about this script, it's when ever i make any new script in my server i can see some people asking for help here to make like what i do.examples: 1-i make a script vote maps for BaseMode from two years ago, i saw someone here asking help to make it 2-i make script anti vote flood for BaseMode and than someone has uploaded one like what i make in community 3-i make script GhostMode for BaseMode, and too i see them on community 4- i make shop in my server for BaseMode, i saw here 1594156741567 one asking for help to make like what i do(with stolen image from my shop) and many others scripts .. you are realy good scripter don't care about them Link to comment
karlis Posted January 18, 2012 Share Posted January 18, 2012 well, all those ideas are obvious. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now