Jump to content

Flipi

Members
  • Posts

    321
  • Joined

  • Last visited

Everything posted by Flipi

  1. Flipi

    script

    Hi, how to make a script to display the date? (i am noob D:)
  2. Flipi

    Help

    thanks hehehe
  3. Flipi

    Help

    hi, how add shadow in the text (the hour is the text).... here the script: addEventHandler("onClientRender",root, function() local hours = getRealTime().hour local minutes = getRealTime().minute local seconds = getRealTime().second dxDrawText(hours..":"..minutes..":"..seconds,0,0,10,10,tocolor(0,128,255),1.5,"default-bold") end )
  4. Flipi

    Ayuda :P

    Hola, necesito ayuda con este script (editar) Lo que realiza este script es cambiar el color del nitro, pero solo el que pone el comando puedes verlo, los demás no, la cosa es que quiero que sea visible para todos, ej: "/nitro 255 0 0" y que todos vean mi color de nitro. addEventHandler("onClientResourceStart",resourceRoot, function() nitroShader = dxCreateShader("nitro.fx") end) function updateNitroColor(r,g,b) if nitroShader then if r and g and b then engineApplyShaderToWorldTexture (nitroShader,"smoke") dxSetShaderValue (nitroShader, "gNitroColor", r/255, g/255, b/255 ) end end end function resetNitroColor() if nitroShader then engineRemoveShaderFromWorldTexture(nitroShader,"smoke") end end addCommandHandler("nitro", function(command,r,g,b) if r and g and b then local r,g,b = tonumber(r),tonumber(g),tonumber(b) if r <= 0 and g <= 128 and b <= 255 then updateNitroColor(r,g,b) outputChatBox("Nuevo color de nitro!", 0, 128, 255, true) else outputChatBox("Los colores deben ser entre 0 y 255", 0, 128, 255, true) end else resetNitroColor() outputChatBox("El color del nitro volvio al original!", 0, 128, 255, true) end end)
  5. Flipi

    help edit

    hi, how to modify for to be visible for everyone? (to see the color of nitro for any player) addEventHandler("onClientResourceStart",resourceRoot, function() nitroShader = dxCreateShader("nitro.fx") end) function updateNitroColor(r,g,b) if nitroShader then if r and g and b then engineApplyShaderToWorldTexture (nitroShader,"smoke") dxSetShaderValue (nitroShader, "gNitroColor", r/255, g/255, b/255 ) end end end function resetNitroColor() if nitroShader then engineRemoveShaderFromWorldTexture(nitroShader,"smoke") end end addCommandHandler("nitro", function(command,r,g,b) if r and g and b then local r,g,b = tonumber(r),tonumber(g),tonumber(b) if r <= 0 and g <= 128 and b <= 255 then updateNitroColor(r,g,b) outputChatBox("Nuevo color de nitro!", 0, 128, 255, true) else outputChatBox("Los colores deben ser entre 0 y 255", 0, 128, 255, true) end else resetNitroColor() outputChatBox("El color del nitro volvio al original!", 0, 128, 255, true) end end)
  6. Flipi

    help

    is resource voice.zip
  7. Flipi

    help

    no icon microphone in the scoreboard.. (does not appear icon)
  8. Flipi

    help

    because microphone icon not appears in the scoreboard? IMG: http://img822.imageshack.us/img822/1761/szf2.png
  9. Flipi

    help script

    this... [Error] [gameplay]\freeroam\fr_server.lua :153: attempt to call global 'clientCall' (a nil value)
  10. Flipi

    help script

    I still get error
  11. Flipi

    help script

    no, here is the fr_server.lua g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) g_PlayerData = {} g_VehicleData = {} local chatTime = {} local lastChatMessage = {} 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 = true, warpMe = { option = 'warp', descr = 'Warping' } } g_OptionDefaults = { alpha = true, anim = true, clothes = true, createvehicle = true, gamespeed = { enabled = true, min = 0.0, max = 3 }, gravity = { enabled = true, 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 = true, freeze = false }, upgrades = true, warp = true, weapons = { enabled = true, vehiclesenabled = true, disallowed = {} }, weather = true, welcometextonstart = true, vehicles = { maxidletime = 60000, idleexplode = true, maxperplayer = 2, disallowed = {} } } 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 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('Bienvenido al Server!', player, 0, 128, 255) outputChatBox('Presiona F1 para acceder al panel', player, 0, 128, 255) 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 warpStatus ( player ) local status = ( not getElementData ( player, "warp.status" ) )
  12. Flipi

    help script

    hey, I got an error HELP!: [Error] [gameplay]\freeroam\fr_server.lua :153: attempt to call global 'clientCall' (a nil value) [Error] [gameplay]\freeroam\fr_server.lua :252: attempt to concatenate a boolean value [Error] [gameplay]\freeroam\fr_server.lua :260: attempt to concatenate a boolean value fr_server.lua g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) g_PlayerData = {} g_VehicleData = {} local chatTime = {} local lastChatMessage = {} 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 = true, warpMe = { option = 'warp', descr = 'Warping' } } g_OptionDefaults = { alpha = true, anim = true, clothes = true, createvehicle = true, gamespeed = { enabled = true, min = 0.0, max = 3 }, gravity = { enabled = true, 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 = true, freeze = false }, upgrades = true, warp = true, weapons = { enabled = true, vehiclesenabled = true, disallowed = {} }, weather = true, welcometextonstart = true, vehicles = { maxidletime = 60000, idleexplode = true, maxperplayer = 2, disallowed = {} } } 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 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('Bienvenido al Server!', player, 0, 128, 255) outputChatBox('Presiona F1 para acceder al panel', player, 0, 128, 255) 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 warpStatus ( player ) local status = ( not getElementData ( player, "warp.status" ) )
  13. Flipi

    help script

    ah oks, was only a question
  14. Flipi

    help script

    or replace for "everyone"?
  15. Flipi

    Ayuda

    Ahora funciona ! gracias !!
  16. Flipi

    help script

    but this is only for admins?
  17. Flipi

    Ayuda

    pero probaste con el que modifique o con el tuyo?
  18. Flipi

    help script

    remove function "warpMe" freeroam?
  19. Flipi

    Ayuda

    pasa lo mismo, pero como lo puedo hacer con el que modifique? models = { [29] = true ; [294] = true ; } function alCambiarSkin( oldModel, newModel ) if ( models[getElementType( source ) == "player"] ) then local accountname = getAccountName ( getPlayerAccount ( source ) ) if not ( isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) ) then setElementModel ( source, oldModel ) outputChatBox ( "Este skin es solo para 'admins'!", source, 0, 128, 255 ) end end end addEventHandler( "onElementModelChange", root, alCambiarSkin )
  20. Flipi

    help script

    this? function warpStatus ( player ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Admin" ) ) then local status = ( not getElementData ( player, "warp.status" ) ) setElementData ( player, "warp.status", status ) outputChatBox ( "You have ".. ( status and "enabled" or "disabled" ) .." your warping", player ) end end addCommandHandler ( "nowarp", warpStatus ) function warpMe(targetPlayer) if (getElementData(targetPlayer,"warp.status") == false) then 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
  21. Flipi

    help script

    yes something, when you write /enable, players can warp you and write /disable, players can not warp you...
  22. Flipi

    Ayuda

    Funciona solo la parte del outputChatBox, pero igual permite cambiar el skin yo hice algo asi pero no funciona models = { [29] = true ; [294] = true ; } function alCambiarSkin( oldModel, newModel ) if ( models[getElementType( source ) == "player"] ) then local accountname = getAccountName ( getPlayerAccount ( source ) ) if not ( isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) ) then setElementModel ( source, oldModel ) outputChatBox ( "Este skin es solo para 'admins'!", source, 0, 128, 255 ) end end end addEventHandler( "onElementModelChange", root, alCambiarSkin )
  23. Flipi

    Ayuda

    Como lo hago, es que no se como ocupar ese evento
  24. Flipi

    Ayuda

    me aparece un error. [warning] .lua : 2 : Bad argument @ 'getAccountName' [Expected account at argument 1, got nil] [error] .lua : 3 : attempt to concatenate global 'accountname' (a boolean value) PD: lo que quiero es que ocupando el comando /ss "numero de skin" de freeroam, al poner por ejemplo /ss 4, diga "este skin es solo para admins". [me explique bien?]
×
×
  • Create New...