Jump to content

FlyingSpoon

Members
  • Posts

    749
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by FlyingSpoon

  1. id = 0 if (spectators==true) then local i = 1 spectators = {} spectators[i] = {} local players = getPlayersInTeam(getTeamFromName ( "Spectators" )) or 0 for k,v in ipairs(players) do spectators[i].name = getPlayerName(v) spectators[i].fps = getElementData(v,"fps") spectators[i].ping = getPlayerPing(v) dxDrawRectangle(screenW * 0.2977, screenH * 0.3583+33*id, screenW * 0.4055, screenH * 0.0431, tocolor(40, 40, 40, 114), false) dxDrawText(spectators[i].name, screenW * 0.3063, screenH * 0.3694+33*id, screenW * 0.3633, screenH * 0.3917, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, true, false) dxDrawText(spectators[i].fps or 0, screenW * 0.6281, screenH * 0.3681+33*id, screenW * 0.6453, screenH * 0.3875, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) dxDrawText(spectators[i].ping, screenW * 0.6672, screenH * 0.3681+33*id, screenW * 0.6844, screenH * 0.3875, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) end i = i + 1 end if scoreboard == true then bindKey( "mouse2", "both", showTheCursor ) else unbindKey( "mouse2", "both", showTheCursor ) end end id = id + 1 end end Alright so what it does is - It overlaps the names, instead of inserting them on a new line
  2. function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ) local name = getPlayerName(thePlayer) outputChatBox("#B24D4D[Global]#FFFFFF "..name..": #ffffff"..message, players, 255, 255, 255, true) end addCommandHandler("global", globalMessage) function outputChatBoxRemote ( playerName, message, type, serverport ) outputChatBox ( "From " .. playerName .. " on " .. serverport .. ": " .. message ) outputDebugString ( "From " .. playerName .. " on " .. serverport .. ": " .. message ) return "hello sailor" end function finishedCallback( responseData, errno ) responseData = tostring(responseData) if responseData == "ERROR" then outputDebugString( "callRemote: ERROR #" .. errno ) elseif responseData ~= "hello sailor" then outputDebugString( "callRemote: Unexpected reply: " .. responseData ) else end end function playerChat ( message, type ) callRemote ( "46.4.173.215:22004", getResourceName(getThisResource()), "outputChatBoxRemote", "46.4.173.215:22004", finishedCallback, getPlayerName(source), message, type, getServerPort() ) callRemote ( "46.4.173.215:22005", getResourceName(getThisResource()), "outputChatBoxRemote","46.4.173.215:22005", finishedCallback, getPlayerName(source), message, type, getServerPort() ) end addEventHandler ( "onPlayerChat", getRootElement(), playerChat ) callRemote: ERROR #404 ---------- Also I added this into both ACL's of the servers - <group name="OutRPCGroup"> <acl name="OutRPC" /> <object name="resource.chat" /> </group> <acl name="OutRPC"> <right name="function.callRemote" access="true" /> </acl> <group name="InRPCGroup"> <acl name="InRPC" /> <object name="user.http_guest" /> </group> <acl name="InRPC"> <right name="resource.chat.http" access="true" /> </acl> "chat" being the name of the resource.
  3. function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ) local name = getPlayerName(thePlayer) outputChatBox("#B24D4D[Global]#FFFFFF "..name..": #ffffff"..message, players, 255, 255, 255, true) end addCommandHandler("global", globalMessage) function outputChatBoxRemote ( playerName, message, type, serverport ) outputChatBox ( "From " .. playerName .. " on " .. serverport .. ": " .. message ) outputDebugString ( "From " .. playerName .. " on " .. serverport .. ": " .. message ) return "hello sailor" end function finishedCallback( responseData, errno ) responseData = tostring(responseData) if responseData == "ERROR" then outputDebugString( "callRemote: ERROR #" .. errno ) elseif responseData ~= "hello sailor" then outputDebugString( "callRemote: Unexpected reply: " .. responseData ) else end end function playerChat ( message, type ) callRemote ( "46.4.173.215:22004", getResourceName(getThisResource()), "outputChatBoxRemote", finishedCallback, getPlayerName(source), message, type, getServerPort() ) callRemote ( "46.4.173.215:22005", getResourceName(getThisResource()), "outputChatBoxRemote", finishedCallback, getPlayerName(source), message, type, getServerPort() ) end addEventHandler ( "onPlayerChat", getRootElement(), playerChat ) [15:34:56] WARNING: chat/server.lua:25: Bad argument @ 'callRemote' [Expected st ring at argument 4, got function] [15:35:02] WARNING: chat/server.lua:26: Bad argument @ 'callRemote' [Expected st ring at argument 4, got function] Also how would I only set it so the global chat only appears?
  4. Hey thereee, members of the community! We've launched our Portal - http://ftw-gaming.com!
  5. -- Remote function set with callRemote 'functionName' argument -- Called from/on remote servers function outputChatBoxRemote ( playerName, message, type, serverport ) outputChatBox ( "From " .. playerName .. " on " .. serverport .. ": " .. message ) return "hello sailor" end -- Callback set with callRemote 'callbackFunction' argument -- Called on the local server when callRemote has completed successfully or with errors function finishedCallback( responseData, errno ) responseData = tostring(responseData) if responseData == "ERROR" then outputDebugString( "callRemote: ERROR #" .. errno ) elseif responseData ~= "hello sailor" then outputDebugString( "callRemote: Unexpected reply: " .. responseData ) else -- callRemote completed successfully end end function playerChat ( message, type ) callRemote ( "play.mtabeta.com:33004", getResourceName(getThisResource()), "outputChatBoxRemote", finishedCallback, getPlayerName(source), message, type, getServerPort() ) callRemote ( "play.mtabeta.com:33005", getResourceName(getThisResource()), "outputChatBoxRemote", finishedCallback, getPlayerName(source), message, type, getServerPort() ) callRemote ( "play.mtabeta.com:33006", getResourceName(getThisResource()), "outputChatBoxRemote", finishedCallback, getPlayerName(source), message, type, getServerPort() ) end addEventHandler ( "onPlayerChat", getRootElement(), playerChat ) Okay I get that all, how would I make it so for example, if I have a seperate chat binded on say for example "G". How would I use that chat? Instead of the default chat.
  6. Hey, I saw this in a few servers, they've made a script so that, for example if they have 2 servers, players can talk to eachother from the 2 servers. Like - e.g. - [DM]: Player1: Hey! And the player on the other server - [SH]: Player2: Hey! ---- I've seen it in a few servers? How can I do this?
  7. Welcome to FTW Gaming, a new beginning, and a new fresh start, to your MTA Career. We as a team, want to provide you the best possible gameplay, but as a family. We insist, to keep our members, and players, in a safe, friendly and peaceful environment by allowing them to use their own freedom, browsing out Forums, meeting old friends, creating new bonds and much much more. Not only this, get a chance to be a part of the journey, we as a team are working on mini-projects, named behind FTW Gaming, if you want to become a part of it, a BETA Tester, Helper or participator, go ahead and apply if you meet our requirements, why not, we're more than happy to have you. About Us Initially, we set up our clan well back. It all started off as a brief idea, not official, but to create a friendly, safe and stable environment to allow different types of players to spend their time, get to meet others, play together. We had an intention to make a gaming community, which would host multiple servers, starting from Multi Theft Auto, moving to Counter Strike: Global Offensive, Garry's Mod, and even Minecraft. We decided to start small, then grow as a community together, that's why we need your help. FTW Gaming, was released late yesterday, due to come out today, in order to let players and members sign up, and test our systems, including 13 current clan members. What makes us special? Good question, we're deciding to bring something much different. Taking a look at things from a different perspective, to enforce a professional game manner on our players and community members. Not only this, but give players the opportunity to manage their own server, hosted right under our name, to give them the opportunity to make their own project live, we got you covered, all you have to do is meet our requirements. Not only this, as a team, we aim to grow much bigger than the rest, with your help and ideas, make something out of the ordinary and something unique, which would interest multiple players, and as a whole strive for success. Do you guys have a server? We're currently, working on a few separate servers, such as Shooter, Deathmatch, Destruction Derby and a few others, to allow our players and members to train to their max abilities and try out some of our impossible map structures, skilled players, and fully new, built-from-scratch scripts. We will keep you guys updated regarding our servers, under Server category, stay tuned and expect to hear more from us soon. What do I do now? We want to let you know, that we need you! Yes you, we are trying to find many players skilled in different sectors such as, Deathmatch, Shooter, Race, Destruction Derby, Fun and much more. All you have to do is visit our website link below, and then find the Join Requests, and see if you meet our requirements. It's simple and easy and you get a chance to meet new people, start fresh in a new family, and get a chance to play against and with skilled members, within the different types of gamemodes suggested above. Get going, and start registering to stay updated! _______________________________ Website: http://ftw-gaming.com Forums:http://forums.ftw-gaming.com ________________________________ Our Community Servers
  8. Get a chance to win yourself a FREE .COM Domain - All you have to do is follow the instructions at this link, no scams, verified offer - https://twitter.com/BlimpHosting
  9. Start applying for your FREE MTA Servers here - http://forums.raysmta.com/forumdisplay.php?fid=24
  10. Can an admin close/delete this thread? I've created a new one, thanks :)!
  11. As you may know, our MTA Server Plans are not yet active, they will be active very soon, stay updated by visiting the link http://raysmta.com Visit Blimp Hosting Packages: https://www.blimphosting.com/billing/aff.php?aff=2 Servers are hosted within the United Kingdom, and DDOS Protected. Limited Offers Only, grab your server! http://raysmta.com http://forums.raysmta.com
  12. Start applying for your FREE MTA Servers here - http://forums.raysmta.com/forumdisplay.php?fid=24
  13. Topic Updated FREE Game Hosting: http://raysmta.com Gameservers yet to arrive. CHEAP Web Hosting: https://www.blimphosting.com/billing/aff.php?aff=2 ------------------------------------------------------------------------------------------------------ Can an admin change the title of the topic? It's not letting me - Change: RaysMTA.com - FREE Gameservers, CHEAP Web Hosting (DDOS Protected)
  14. Re-opening soon - http://raysmta.com Stay updated. And since some other company randomly purchased - http://raysmta.eu - I suggest you stay away from that since they sell paid products not 'FREE'. I'd recommend you get registered on our Forums, and our Hosting will be up soon.
  15. So dbPoll gets all the data? So if I wanted to get all player names first I'd run the query - local query = dbQuery(database, "SELECT * FROM accounts) local result = dbPoll(query,-1) outputChatBox(result, source) That would display all the data from accounts?
  16. Okay here is another example - local result = dbQuery(database, "SELECT * FROM players") for _, ad in ipairs( result ) do :bad argument #1 to 'ipairs' (table expected, got userdata) What does this mean?
  17. So what would happen if we did i=0,#tab do
  18. Also I had a question about this, function setData(tab) for i=1,#tab do What does i=1 do and #tab ?
  19. Thanks, I'm using dbConnect now, it's much simpler, thank you so much.
  20. Like I've mentioned before this section is for helping, keep your pathetic, false opinions to yourself and use it somewhere else. And note, I don't hate all communities, I'm enjoying VC-RP's current progress and also enjoy Owl Gaming. And asking help on the MTA Forums is available for anyone. I'm not asking anyone to make my scripts. So I think you should grow, and stop going around placing false facts, hiding behind other names.
×
×
  • Create New...