Jump to content

Timiimit

Members
  • Posts

    142
  • Joined

  • Last visited

Everything posted by Timiimit

  1. Timiimit

    Help me!

    Hi! I am making a script that adds nitro to vehicle when you enter. This is what i have: addEventHandler ( "onClientVehicleEnter", addNitro ( source ) local driver = getVehicleOccupant ( source ) if ( driver ) then addVehicleUpgrade ( theVehicle, 1010 ) end end) But it doesn't work anyone know what is wrong? It doesn't says that there is error.
  2. Timiimit

    Moon

    yes, but how to??
  3. Timiimit

    Moon

    but in the script is are used ".png" images?!!
  4. Timiimit

    Moon

    I saw a resource in community called "nyan". I would like to know how to replace the moon like resource does. btw i tried to figure out how to, but i have no clue! Can anyone tell me how to do that but only to replace the moon with one img?
  5. How should I use this? something like this? setElementDimention ( resourcename , 1 ) or what?
  6. Is it possible to load resource only in one dimention? How?
  7. I dont want race script i just want to make that race would be only in dimention 1. Not in other dimentions.
  8. Omg my longest script has less then 50 lines! Im in sirious trubble. Can anyone help me with this im really bad at lua scripting!
  9. Why it's hard for race?
  10. I want to have in dimention 0 freeroam and in 1 race.
  11. Hi! I created a map but now it doesn't load if i press 'save' button it says on the bootom 'cannot quick save while a load is in progress'. I am waiting and waiting (now for about 1h) but it doesen't load. It always worked but not now. I tried other maps (which are already in MTA when you install) and they don't load. My comp is fast... what is problem??? They load in my server when i start it!??
  12. Is it possible to make two different gamemodes in two different dimenions? If yes how???
  13. Timiimit

    Disco help

    But still what is the id??
  14. Timiimit

    Disco help

    Hi! I'm making a script and i need id of stereo and disco lights. Anyone knowes the id? I'we been searching for it for a week, but no luck!!
  15. Hi! I would like to learn how to make argumants for command. i have no idea how to! PLZZ HELP!! thx
  16. Timiimit

    no warp!

    fr_server: function warpMe(targetPlayer) if getElementData(targetPlayer,"IsWarpLocked") then outputChatBox("Not allowed Warp to this player, he is locked warp.",source) return end if isPedDead(source) then spawnMe() end local vehicle = getPedOccupiedVehicle(targetPlayer) if not vehicle then -- target player is not in a vehicle - just warp next to him local x, y, z = getElementPosition(targetPlayer) clientCall(source, 'setPlayerPosition', x + 2, y, z) else -- target player is in a vehicle - warp into it if there's space left if getPedOccupiedVehicle(source) then --removePlayerFromVehicle(source) outputChatBox('Get out of your vehicle first.', source) return end local numseats = getVehicleMaxPassengers(vehicle) for i=0,numseats do if not getVehicleOccupant(vehicle, i) then if isPedDead(source) then local x, y, z = getElementPosition(vehicle) spawnMe(x + 4, y, z + 1) end warpPedIntoVehicle(source, vehicle, i) return end end outputChatBox('No free seats left in ' .. getPlayerName(targetPlayer) .. ''s vehicle.', source, 255, 0, 0) end local interior = getElementInterior(targetPlayer) setElementInterior(source, interior) setCameraInterior(source, interior) end whole 'fr_server': g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) g_PlayerData = {} g_VehicleData = {} g_ArmedVehicles = { [425] = true, [447] = true, [520] = true, [430] = true, [464] = true, [432] = true } g_Trailers = { [606] = true, [607] = true, [610] = true, [590] = true, [569] = true, [611] = true, [584] = true, [608] = true, [435] = true, [450] = true, [591] = true } g_RPCFunctions = { addPedClothes = { option = 'clothes', descr = 'Modifying clothes' }, addVehicleUpgrade = { option = 'upgrades', descr = 'Adding/removing upgrades' }, fadeVehiclePassengersCamera = true, fixVehicle = { option = 'repair', descr = 'Repairing vehicles' }, giveMeVehicles = { option = 'createvehicle', descr = 'Creating vehicles' }, giveMeWeapon = { option = 'weapons.enabled', descr = 'Getting weapons' }, givePedJetPack = { option = 'jetpack', descr = 'Getting a jetpack' }, killPed = { option = 'kill', descr = 'Killing yourself' }, removePedClothes = { option = 'clothes', descr = 'Modifying clothes' }, removePedFromVehicle = true, removePedJetPack = { option = 'jetpack', descr = 'Removing a jetpack' }, removeVehicleUpgrade = { option = 'upgrades', descr = 'Adding/removing upgrades' }, setElementAlpha = { option = 'alpha', descr = 'Changing your alpha' }, setElementPosition = true, setElementInterior = true, setMyGameSpeed = { option = 'gamespeed.enabled', descr = 'Setting game speed' }, setMySkin = { option = 'setskin', descr = 'Setting skin' }, setPedAnimation = { option = 'anim', descr = 'Setting an animation' }, setPedFightingStyle = { option = 'setstyle', descr = 'Setting fighting style' }, setPedGravity = { option = 'gravity.enabled', descr = 'Setting gravity' }, setPedStat = { option = 'stats', descr = 'Changing stats' }, setTime = { option = 'time.set', descr = 'Changing time' }, setTimeFrozen = { option = 'time.freeze', descr = 'Freezing time' }, setVehicleColor = true, setVehicleHeadLightColor = true, setVehicleOverrideLights = { option = 'lights', descr = 'Forcing lights' }, setVehiclePaintjob = { option = 'paintjob', descr = 'Applying paintjobs' }, setVehicleRotation = true, setWeather = { option = 'weather', descr = 'Setting weather' }, spawnMe = false, warpMe = { option = 'warp', descr = 'Warping' } } g_OptionDefaults = { alpha = true, anim = true, clothes = true, createvehicle = true, gamespeed = { enabled = false, min = 0.0, max = 3 }, gravity = { enabled = false, min = 0, max = 0.1 }, jetpack = true, kill = true, lights = true, paintjob = true, repair = true, setskin = true, setstyle = true, spawnmaponstart = true, spawnmapondeath = true, stats = true, time = { set = false, freeze = true }, upgrades = true, warp = true, weapons = { enabled = false, vehiclesenabled = true, disallowed = {} }, weather = false, welcometextonstart = true, vehicles = { maxidletime = 60000, idleexplode = true, maxperplayer = 1, disallowed = {dumper} } } function getOption(optionName) local option = get(optionName:gsub('%.', '/')) if option then if option == 'true' then option = true elseif option == 'false' then option = false end return option end option = g_OptionDefaults for i,part in ipairs(optionName:split('.')) do option = option[part] end return option end addEventHandler('onResourceStart', g_ResRoot, function() table.each(getElementsByType('player'), joinHandler) end ) function joinHandler(player) if not player then player = source end local r, g, b = math.random(50, 255), math.random(50, 255), math.random(50, 255) setPlayerNametagColor(player, r, g, b) g_PlayerData[player] = { vehicles = {} } g_PlayerData[player].blip = createBlipAttachedTo(player, 0, 2, r, g, b) if g_FrozenTime then clientCall(player, 'setTimeFrozen', true, g_FrozenTime[1], g_FrozenTime[2], g_FrozenWeather) end if getOption('welcometextonstart') then outputChatBox('Welcome to Freeroam', player, 0, 255, 0) outputChatBox('Press F1 to show/hide controls', player, 0, 255, 0) end end addEventHandler('onPlayerJoin', g_Root, joinHandler) addEvent('onLoadedAtClient', true) addEventHandler('onLoadedAtClient', g_ResRoot, function(player) if getOption('spawnmaponstart') and isPedDead(player) then clientCall(player, 'showWelcomeMap') end end, false ) addEventHandler('onPlayerWasted', g_Root, function() if not getOption('spawnmapondeath') then return end local player = source setTimer( function() if isPedDead(player) then clientCall(player, 'showMap') end end, 2000, 1 ) end ) addEvent('onClothesInit', true) addEventHandler('onClothesInit', g_Root, function() local result = {} local texture, model -- get all clothes result.allClothes = {} local typeGroup, index for type=0,17 do typeGroup = {'group', type = type, name = getClothesTypeName(type), children = {}} table.insert(result.allClothes, typeGroup) index = 0 texture, model = getClothesByTypeIndex(type, index) while texture do table.insert(typeGroup.children, {id = index, texture = texture, model = model}) index = index + 1 texture, model = getClothesByTypeIndex(type, index) end end -- get current player clothes { type = {texture=texture, model=model} } result.playerClothes = {} for type=0,17 do texture, model = getPedClothes(source, type) if texture then result.playerClothes[type] = {texture = texture, model = model} end end triggerClientEvent(source, 'onClientClothesInit', source, result) end ) addEvent('onPlayerGravInit', true) addEventHandler('onPlayerGravInit', g_Root, function() triggerClientEvent('onClientPlayerGravInit', source, getPedGravity(source)) end ) function setMySkin(skinid) if isPedDead(source) then local x, y, z = getElementPosition(source) if isPedTerminated(source) then x = 0 y = 0 z = 3 end local r = getPedRotation(source) local interior = getElementInterior(source) spawnPlayer(source, x, y, z, r, skinid) setElementInterior(source, interior) setCameraInterior(source, interior) else setElementModel(source, skinid) setElementHealth(source, 100) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end function spawnMe(x, y, z) if not x then x, y, z = getElementPosition(source) end if isPedTerminated(source) then repeat until spawnPlayer(source, x, y, z, 0, math.random(9, 288)) else spawnPlayer(source, x, y, z, 0, getPedSkin(source)) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end function warpMe(targetPlayer) if
  17. Timiimit

    no warp!

    it says: [2011-12-30 10:59:08] SCRIPT ERROR: freeroam\fr_server.lua:280: ')' expected near 's' [2011-12-30 10:59:08] WARNING: Loading script failed: freeroam\fr_server.lua:280: ')' expected near 's' [2011-12-30 10:59:09] WARNING: myscripts\lockwarp.lua:11: Bad argument @ 'getElementData' [Expected element at argument 1, got nil] script file: addCommandHandler("lockwarp", function(player) setElementData(player,"IsWarpLocked",true) end) addCommandHandler("unlockwarp", function(player) setElementData(player,"IsWarpLocked",false) end) if getElementData(targetPlayer,"IsWarpLocked") then outputChatBox("Not allowed Warp to this player, he is locked warp.") return end
  18. Timiimit

    no warp!

    i know what gamemode is just dont know why you need its name?? anyway my gamemod name is 'Awsome Freeroam'
  19. Timiimit

    no warp!

    i tried: addCommandHandler("lockwarp", function(player) setElementData(player,"IsWarpLocked",true) end) addCommandHandler("unlockwarp", function(player) setElementData(player,"IsWarpLocked",false) end) doesn't work!? + why do you need my gamemode?
  20. Timiimit

    no warp!

    Hi! I would like to make script that noone would be able to warp to you if they would type '/lockwarp'. Right now i have nothing:
  21. Timiimit

    Teleports

    script: function consoleShowMarker ( thePlayer, commandName ) if ( thePlayer ) then local theMarker = createMarker (x,y,z, "cylinder", 1.5, 255, 0, 0, 170 ) if ( theMarker ) then addEventHandler( "onMarkerHit", theMarker, teleportPlayerIfModSmodOrAdmin ) setTimer (destroyElement, 3000, 1, theMarker ) end end end function teleportPlayerIfModSmodOrAdmin ( thePlayer ) if hasObjectPermissionTo ( thePlayer, "command.kick", false ) then setElementPosition ( thePlayer, x,y,z ) end end addCommandHandler ( "showadminmarker", consoleShowMarker ) works!!!!! finally! thx for all.
  22. Timiimit

    Teleports

    still doesn't work...?? log: when server starts [2011-12-27 10:33:43] SCRIPT ERROR: myscripts\adminTeleport.lua:3: '=' expected near 'theMarker' [2011-12-27 10:33:43] WARNING: Loading script failed: myscripts\adminTeleport.lua:3: '=' expected near 'theMarker' when command entered. WARNING: myscripts\adminTeleport.lua:6: Bad argument @ 'addEventHandler' [Expected function at argument 3, got nil]
×
×
  • Create New...