Jump to content

Valli

Members
  • Posts

    39
  • Joined

  • Last visited

Everything posted by Valli

  1. Actually, he's right. The script provided in the first post DOES contain that function twice! But it's not the cause of the problems. Ehh I've just decided not to use Broph, thanks for the hell all.
  2. Darn, did not work. Ohh well I am too lazy to keep trying, will have to do without it I guess. lol.
  3. https://www.youtube.com/watch?v=GzjNHq-X6P0
  4. Because I have no clue on how scripts work.
  5. I see. I didn't know that. I thought it was game mode as it handles mode specific tasks like spawning. When Freeroam is run, broph spawns you at a little cabin somewhere, there is a selection of pre-spawned cars people can roam in.
  6. I put anti alasing or whatever to the highest and then set my resolution to 1440x900 (which my screen is meant for) and now it's gone.
  7. Aye, dosen't seem to affect anything tho, so no big deal.
  8. I want the menu of the GUI, and the spawnpoint of the broph. If I can disable the chat in one, they can work with oneanother.
  9. Ohh okay, gotta wait for my host to take the server offline. Since I have to go to the dentist now then the movies, I wont be able to until tomorrow. But I will send you a PM when it's done to let you know if it worked. And thanks a bunch
  10. Valli

    Master Server acting up?

    Yeah I noticed that going into "recently played", joining an "offline" server, then leaving it and refreshing the main list made them re-appear. Must have been a glitch, my bad about the MS I assumed incorrectly.
  11. Hmm, it didn't work instantly. I will try a server restart. Here is what it looks like when I put in the code, just to double check it's correct.... cancelEvent()addEventHandler (onPlayerChat", root, broph_Chat )
  12. kk done, gonna log on the server and see if it worked, if not I'll try a restart. But ty for the quick help
  13. Don't see it there, I'll check the GUI file. Thanks for the quick response btw
  14. I finally figured out that having the GUI and broph running at the same time was causing people's chat in console to show twice in a row. Is there anyway to disable that part in one of the scripts (that displays chat in console when entered)? Would really appreciate it! Here is the script, if someone could copy the part that controls chat in the console, paste it, and tell me what to change, or if I need to delete it. Thanks. root = getRootElement () players = getElementsByType ( "player" ) connected = 0 function resourceStart ( name ) if ( name == getThisResource() ) then local allMessages = getElementsByType ( "welcome" ) local randomMessage = randInt(1,#allMessages) local varMessageFind = allMessages[randomMessage] local varMessage = getElementData ( varMessageFind, "message" ) outputChatBox ( "" ..varMessage.. "", root, 0, 255, 100 ) setWeather ( 14 ) setTime ( 5, 30 ) for k,v in ipairs(players) do spawn_me( v, 2500 ) end end end function destroyBlipsAttachedTo(player) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end function elementAlpha ( source, command, level ) if ( level ) then if ( source ) then setElementAlpha ( source, tonumber(level) ) end else local alphaLevel = getElementAlpha ( source ) local player = getClientName ( source ) outputChatBox ( "* " ..player.. "'s Alpha Level: " ..alphalevel ) end end function vehicleExplode () setTimer ( respawnVehicle, 2500, 1, source ) end -- addCommandHandler ( "output", "outputOnLoad" ) -- function outputOnLoad ( name ) -- for k,v in getElementsByType ( "vehicle" ) do -- local model = getVehicleID ( v ) -- local id = getVehicleNameFromID ( model ) -- local x, y, z = getElementPosition ( v ) -- local rx, ry, rz = getVehicleRotation ( v ) -- local c1, c2, c3, c4 = getVehicleColor ( v ) -- outputConsole ( "<vehicle id=\"" .. id .. "\" model=\"" .. model .. "\" posX=\"" .. x .. "\" posY=\"" .. y .. "\" posZ=\"" .. z .. "\" rotX=\"" .. rx .. "\" rotY=\"" .. ry .. "\" rotZ=\"" .. rz .. "\" colors=\"" .. c1 .. "," .. c2 .. "," .. c3 .. "," .. c4 .. "\"/>" ) -- outputDebugString ( "<vehicle id=\"" .. id .. "\" model=\"" .. model .. "\" posX=\"" .. x .. "\" posY=\"" .. y .. "\" posZ=\"" .. z .. "\" rotX=\"" .. rx .. "\" rotY=\"" .. ry .. "\" rotZ=\"" .. rz .. "\" colors=\"" .. c1 .. "," .. c2 .. "," .. c3 .. "," .. c4 .. "\"/>" ) -- end -- end function playerSpawn ( spawnpoint ) --TALIDAN STUFFZOR local rand1 = randInt(50,255) local rand2 = randInt(50,255) local rand3 = randInt(50,255) blip = createBlipAttachedTo ( source, 0, 2, rand1, rand2, rand3, 90 ) setPlayerNametagColor ( source, rand1, rand2, rand3 ) setElementData ( source, "colour_r", rand1 ) setElementData ( source, "colour_g", rand2 ) setElementData ( source, "colour_b", rand3 ) end function broph_Chat ( message, theType ) if theType == 0 then cancelEvent() message = string.gsub(message, "#%x%x%x%x%x%x", "") local r = getElementData ( source, "colour_r" ) local g = getElementData ( source, "colour_g" ) local b = getElementData ( source, "colour_b" ) local bastidName = getClientName ( source ) outputChatBox ( bastidName..":#FFFFFF "..message, getRootElement(), r, g, b, true ) end end function setWaveLevel ( source, command, height ) if ( height ) then setWaveHeight ( height ) else wavelevel = getWaveHeight () outputConsole ( "Wave Height: " ..wavelevel ) end end function setLevel ( source, command, levelplayer, level ) if ( getClientName ( source ) == "BrophY" ) then local player = getPlayerFromNick ( levelplayer ) setClientLevel ( player , tonumber ( level ) ) end end function kickPlayer ( player, commandname, kickedname, reason ) local kicked = getPlayerFromNick ( kickedname ) if ( getClientName ( source ) == "BrophY" ) then kickPlayer ( kicked, player, reason ) end end function playerWasted () destroyBlipsAttachedTo ( source ) spawn_me ( source, 2500 ) end function playerJoin () spawn_me( source, 1500 ) end function playerQuit () destroyBlipsAttachedTo ( source ) end function spawn_me( player, timer ) setTimer ( spawnThePlayer, timer, 1, player ) end function spawnThePlayer ( player ) local b = spawnPlayer ( player, -711+randInt(1,5), 957+randInt(5,9), 12.4, 90, randInt(9,288) ) if not b then spawnThePlayer ( player ) return end fadeCamera(player,true) end function veh ( source, command, vehid ) local x,y,z = getElementPosition ( source ) local car = createVehicle ( tonumber(vehid), tonumber(x), tonumber(y), tonumber(z) ) warpPlayerIntoVehicle ( source, car ) end function pass ( source, command, player, seat ) local name = getPlayerFromNick ( player ) local car = getPlayerOccupiedVehicle ( name ) warpPlayerIntoVehicle ( source, car, seat ) end function distance ( source, command, player1, player2 ) if ( not player1 ) then outputChatBox ( "You need to select someone to check your distance!", source, 255, 255, 0 ) end if ( player1 and not player2 ) then local player1id = getPlayerFromNick ( player1 ) if ( player1id ) then local player1name = getClientName ( player1id ) local player2name = getClientName ( source ) local x1, y1, z1 = getElementPosition ( player1id ) local x2, y2, z2 = getElementPosition ( source ) local distance = getDistanceBetweenPoints2D ( x1, y1, x2, y2 ) / 2 local distresult = math.ceil ( distance ) if ( distance >= 402.25 ) then local totaldistance = distance / 402.25 local resultx = math.ceil( totaldistance ) outputChatBox ( "The Distance between " ..player1name.. " and " ..player2name.. " is " ..resultx.. " Miles", root, 255, 255, 0 ) else outputChatBox ( "The Distance between " ..player1name.. " and " ..player2name.. " is " ..distresult.. " Meters", root, 255, 255, 0 ) end elseif ( player1id == false ) then outputChatBox ( "Player not found!", source, 255, 255, 0 ) end end if ( player2 ) then local player1id = getPlayerFromNick ( player1 ) local player2id = getPlayerFromNick ( player2 ) if ( player1id and player2id ) then local player1name = getClientName ( player1id ) local player2name = getClientName ( player2id ) local x1, y1, z1 = getElementPosition ( player1id ) local x2, y2, z2 = getElementPosition ( player2id ) local distance = getDistanceBetweenPoints2D ( x1, y1, x2, y2 ) / 2 local distresult = math.ceil ( distance ) if ( distance >= 402.25 ) then local totaldistance = distance / 402.25 local resultx = math.ceil( totaldistance ) outputChatBox ( "The Distance between " ..player1name.. " and " ..player2name.. " is " ..resultx.. " Miles", root, 255, 255, 0 ) else outputChatBox ( "The Distance between " ..player1name.. " and " ..player2name.. " is " ..distresult.. " Meters", root, 255, 255, 0 ) end elseif ( player1id == false or player2id == false ) then outputChatBox ( "Player not found!", source, 255, 255, 0 ) end end end function grav ( source, command, gravid ) setGravity ( gravid ) for k,v in ipairs(players) do setPlayerGravity ( v, gravid ) end end function gravlevel () local gravity = getGravity () outputConsole ( "Gravity is currently set to " ..gravity.. "" ) end function setgamespeed ( player, command, value ) setGameSpeed ( tonumber ( value ) ) end function gamespeed ( player, command, value ) local speed = getGameSpeed () outputConsole ( "GameSpeed is currently set to " ..speed.. "" ) end function consoleKill ( player, commandName ) if ( player ) then killPlayer ( player ) end end function testSound ( source, command, ids ) local players = getElementsByType( "player" ) local idsx = tonumber ( ids ) for k,v in ipairs(players) do playSoundFrontEnd ( v, idsx ) end end function armor ( source ) setPlayerArmor ( source, 100 ) end function testSound2 ( source, command, ids ) preloadMissionAudio ( source, ids, 1 ) local x,y,z = getElementPosition ( source ) playMissionAudio ( source, 1, x, y, z ) end function playslot () playMissionAudio ( source, 1, x, y, z ) end function style ( player, command, ids ) setPlayerFightingStyle ( player, tonumber(ids) ) end ----TALIDAN ADDED THIS CRAP, <3 BROPHY --[[Vehicle pos/rot: -721.44641113281 1014.2721557617 11.814476966858, 186.75370788574 357.12237548828 189.90641784668]] function flipVehicle ( source, cmd ) if ( isPlayerInVehicle ( source ) == true ) then local theVehicle = getPlayerOccupiedVehicle ( source ) local x,y,z = getElementPosition ( theVehicle ) local rx,ry,rz = getVehicleRotation ( theVehicle ) if rx > 180 then rz = rz - 180 end
  15. Valli

    Master Server acting up?

    I am pretty sure there is a master server.
  16. Valli

    Master Server acting up?

    Um.... yeah there is something called a master server. It grabs the info from all the other servers and displays them in the list for you. How do you think that information gets there bub? I am connected to the highest cable a residence can get and I have the modem running on a packet tracker (program that starts when my computer does, and instantly begins tracking how many packets pass through the modem). From looking at my logs, I have not had more then a 2 second gap in connection... which is so small no program would detect it (dis-connect). Master servers are what bring the list of normal servers up in the page, every single game with different servers runs on one. I am not trying to embarrass or say you don't know what your talking about, because I admit I might be mistaken. But I work as a GM for Sony Online Entertainment and I am pretty sure that any game running multiple servers, player run or game run, use a Master Server to bring the list together for the user.
  17. My connection has been dropping all day in various servers including my own whereas running the internet itself... it's not the connection on my end. Anyone know what's going on?
  18. Now I am having it again. *sigh*
  19. I got the speedmeter and glue running. Then freeroam GUI.
  20. Well in the scripting section I listed a problem with the broph script. These happen even with it off, but luckily they don't seem to mess with anything. Just wondering what they might mean
  21. I find these in my server chat log, also see my post in the scripts area about the broph script problems. Here I will supply some script errors, anyone know what they mean? WARNING: fr_server.lua: Bad 'element' pointer @ 'destroyElement'(1) - Line: 416 ERROR: ...mods/deathmatch/resourcecache/freeroam/fr_server.lua:227: attempt to concatenate a boolean value ERROR: ...mods/deathmatch/resourcecache/freeroam/fr_server.lua:385: attempt to index field '?' (a nil value) Wondering how I can fix these.... thanks
  22. I found a place to re-download them. Think I should give it a try?
  23. These were added to my resources by the server provider. Below I will list the 4 files, there is a bug in one of them that causes chat go pop twice. When someone says something it is put in the console chat twice in a row. Once I turned it off, it stopped. (This happens for everyone on my server. If someone can suggest I change something in the script, or a place to download a new one. I like this script because it changes people's name colors, and provides a spawnpoint for freeroam that hosts a series of vehicles people can take. Thanks a bunch, this is my last issue with my server... once I fix it I can finally quit bothering with it. lol There are 4 files in the broph folder, the first named "broph.lua" root = getRootElement () players = getElementsByType ( "player" ) connected = 0 function resourceStart ( name ) if ( name == getThisResource() ) then local allMessages = getElementsByType ( "welcome" ) local randomMessage = randInt(1,#allMessages) local varMessageFind = allMessages[randomMessage] local varMessage = getElementData ( varMessageFind, "message" ) outputChatBox ( "" ..varMessage.. "", root, 0, 255, 100 ) setWeather ( 14 ) setTime ( 5, 30 ) for k,v in ipairs(players) do spawn_me( v, 2500 ) end end end function destroyBlipsAttachedTo(player) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end function elementAlpha ( source, command, level ) if ( level ) then if ( source ) then setElementAlpha ( source, tonumber(level) ) end else local alphaLevel = getElementAlpha ( source ) local player = getClientName ( source ) outputChatBox ( "* " ..player.. "'s Alpha Level: " ..alphalevel ) end end function vehicleExplode () setTimer ( respawnVehicle, 2500, 1, source ) end -- addCommandHandler ( "output", "outputOnLoad" ) -- function outputOnLoad ( name ) -- for k,v in getElementsByType ( "vehicle" ) do -- local model = getVehicleID ( v ) -- local id = getVehicleNameFromID ( model ) -- local x, y, z = getElementPosition ( v ) -- local rx, ry, rz = getVehicleRotation ( v ) -- local c1, c2, c3, c4 = getVehicleColor ( v ) -- outputConsole ( "<vehicle id=\"" .. id .. "\" model=\"" .. model .. "\" posX=\"" .. x .. "\" posY=\"" .. y .. "\" posZ=\"" .. z .. "\" rotX=\"" .. rx .. "\" rotY=\"" .. ry .. "\" rotZ=\"" .. rz .. "\" colors=\"" .. c1 .. "," .. c2 .. "," .. c3 .. "," .. c4 .. "\"/>" ) -- outputDebugString ( "<vehicle id=\"" .. id .. "\" model=\"" .. model .. "\" posX=\"" .. x .. "\" posY=\"" .. y .. "\" posZ=\"" .. z .. "\" rotX=\"" .. rx .. "\" rotY=\"" .. ry .. "\" rotZ=\"" .. rz .. "\" colors=\"" .. c1 .. "," .. c2 .. "," .. c3 .. "," .. c4 .. "\"/>" ) -- end -- end function playerSpawn ( spawnpoint ) --TALIDAN STUFFZOR local rand1 = randInt(50,255) local rand2 = randInt(50,255) local rand3 = randInt(50,255) blip = createBlipAttachedTo ( source, 0, 2, rand1, rand2, rand3, 90 ) setPlayerNametagColor ( source, rand1, rand2, rand3 ) setElementData ( source, "colour_r", rand1 ) setElementData ( source, "colour_g", rand2 ) setElementData ( source, "colour_b", rand3 ) end function broph_Chat ( message, theType ) if theType == 0 then cancelEvent() message = string.gsub(message, "#%x%x%x%x%x%x", "") local r = getElementData ( source, "colour_r" ) local g = getElementData ( source, "colour_g" ) local b = getElementData ( source, "colour_b" ) local bastidName = getClientName ( source ) outputChatBox ( bastidName..":#FFFFFF "..message, getRootElement(), r, g, b, true ) end end function setWaveLevel ( source, command, height ) if ( height ) then setWaveHeight ( height ) else wavelevel = getWaveHeight () outputConsole ( "Wave Height: " ..wavelevel ) end end function setLevel ( source, command, levelplayer, level ) if ( getClientName ( source ) == "BrophY" ) then local player = getPlayerFromNick ( levelplayer ) setClientLevel ( player , tonumber ( level ) ) end end function kickPlayer ( player, commandname, kickedname, reason ) local kicked = getPlayerFromNick ( kickedname ) if ( getClientName ( source ) == "BrophY" ) then kickPlayer ( kicked, player, reason ) end end function playerWasted () destroyBlipsAttachedTo ( source ) spawn_me ( source, 2500 ) end function playerJoin () spawn_me( source, 1500 ) end function playerQuit () destroyBlipsAttachedTo ( source ) end function spawn_me( player, timer ) setTimer ( spawnThePlayer, timer, 1, player ) end function spawnThePlayer ( player ) local b = spawnPlayer ( player, -711+randInt(1,5), 957+randInt(5,9), 12.4, 90, randInt(9,288) ) if not b then spawnThePlayer ( player ) return end fadeCamera(player,true) end function veh ( source, command, vehid ) local x,y,z = getElementPosition ( source ) local car = createVehicle ( tonumber(vehid), tonumber(x), tonumber(y), tonumber(z) ) warpPlayerIntoVehicle ( source, car ) end function pass ( source, command, player, seat ) local name = getPlayerFromNick ( player ) local car = getPlayerOccupiedVehicle ( name ) warpPlayerIntoVehicle ( source, car, seat ) end function distance ( source, command, player1, player2 ) if ( not player1 ) then outputChatBox ( "You need to select someone to check your distance!", source, 255, 255, 0 ) end if ( player1 and not player2 ) then local player1id = getPlayerFromNick ( player1 ) if ( player1id ) then local player1name = getClientName ( player1id ) local player2name = getClientName ( source ) local x1, y1, z1 = getElementPosition ( player1id ) local x2, y2, z2 = getElementPosition ( source ) local distance = getDistanceBetweenPoints2D ( x1, y1, x2, y2 ) / 2 local distresult = math.ceil ( distance ) if ( distance >= 402.25 ) then local totaldistance = distance / 402.25 local resultx = math.ceil( totaldistance ) outputChatBox ( "The Distance between " ..player1name.. " and " ..player2name.. " is " ..resultx.. " Miles", root, 255, 255, 0 ) else outputChatBox ( "The Distance between " ..player1name.. " and " ..player2name.. " is " ..distresult.. " Meters", root, 255, 255, 0 ) end elseif ( player1id == false ) then outputChatBox ( "Player not found!", source, 255, 255, 0 ) end end if ( player2 ) then local player1id = getPlayerFromNick ( player1 ) local player2id = getPlayerFromNick ( player2 ) if ( player1id and player2id ) then local player1name = getClientName ( player1id ) local player2name = getClientName ( player2id ) local x1, y1, z1 = getElementPosition ( player1id ) local x2, y2, z2 = getElementPosition ( player2id ) local distance = getDistanceBetweenPoints2D ( x1, y1, x2, y2 ) / 2 local distresult = math.ceil ( distance ) if ( distance >= 402.25 ) then local totaldistance = distance / 402.25 local resultx = math.ceil( totaldistance ) outputChatBox ( "The Distance between " ..player1name.. " and " ..player2name.. " is " ..resultx.. " Miles", root, 255, 255, 0 ) else outputChatBox ( "The Distance between " ..player1name.. " and " ..player2name.. " is " ..distresult.. " Meters", root, 255, 255, 0 ) end elseif ( player1id == false or player2id == false ) then outputChatBox ( "Player not found!", source, 255, 255, 0 ) end end end function grav ( source, command, gravid ) setGravity ( gravid ) for k,v in ipairs(players) do setPlayerGravity ( v, gravid ) end end function gravlevel () local gravity = getGravity () outputConsole ( "Gravity is currently set to " ..gravity.. "" ) end function setgamespeed ( player, command, value ) setGameSpeed ( tonumber ( value ) ) end function gamespeed ( player, command, value ) local speed = getGameSpeed () outputConsole ( "GameSpeed is currently set to " ..speed.. "" ) end function consoleKill ( player, commandName ) if ( player ) then killPlayer ( player ) end end function testSound ( source, command, ids ) local players = getElementsByType( "player" ) local idsx = tonumber ( ids ) for k,v in ipairs(players) do playSoundFrontEnd ( v, idsx ) end end function armor ( source ) setPlayerArmor ( source, 100 ) end function testSound2 ( source, command, ids ) preloadMissionAudio ( source, ids, 1 ) local x,y,z = getElementPosition ( source ) playMissionAudio ( source, 1, x, y, z ) end function playslot () playMissionAudio ( source, 1, x, y, z ) end function style ( player, command, ids ) setPlayerFightingStyle ( player, tonumber(ids) ) end ----TALIDAN ADDED THIS CRAP, <3 BROPHY --[[Vehicle pos/rot: -721.44641113281 1014.2721557617 11.814476966858, 186.75370788574 357.12237548828 189.90641784668]] function flipVehicle ( source, cmd ) if ( isPlayerInVehicle ( source ) == true ) then local theVehicle = getPlayerOccupiedVehicle ( source ) local x,y,z = getElementPosition ( theVehicle ) local rx,ry,rz = getVehicleRotation ( theVehicle ) if rx > 180 then rz = rz - 180 end
×
×
  • Create New...