Jump to content

Dannz0r

Members
  • Posts

    108
  • Joined

  • Last visited

Everything posted by Dannz0r

  1. So I have this Roleplay script I started to make from scratch and I have a panel where you press on a 'Team' and when you press select button it sends you to that team, but there is a small problem, if you don't choose a team and just press the button then it just closes the window and your ped is in the same place and not in any team, so I tried to fix it by doing this Client-side function stupidBUG() guiSetVisible(JobsWin, true) showCursor(true) outputChatBox ( "RP: Select a team!", player, 255, 0, 0 ) end addEvent( "blahBlahBlah", true ) addEventHandler( "blahBlahBlah", getRootElement(), stupidBUG ) Server-side addEvent ( "onPlayerChooseTeam" , true ) addEventHandler ( "onPlayerChooseTeam" , root , function ( teamName ) local playerTeam = getPlayerTeam ( source ) -- Check if the player is on a team if playerTeam then -- this player is on a team, so we can remove them from it local oldTeamName = getTeamName ( playerTeam ) else triggerClientEvent ( player, "blahBlahBlah", getRootElement() ) end end) But now the problem is, it will give me error on line 8 (server-side) that string is needed, got a nil, but if I remove 'player' it works but then it triggers the event to the whole server not just that 1 player. how can I fix it?
  2. Where? (Sorry for off topic) I don't do free advertisements
  3. Maybe go down with the price, I can get a domain for 1 year with 3 EUR and I choose my own name.
  4. No offence but your server lags bad, not sure if its because of no1servers or your scripts/maps but it does lag. Lags for you (: With a Intel® Core i5-2410M CPU @ 2.30 GHz 2.30 GHz 2 GB Ram I don't think MTA will lag for me.
  5. We offer good hosting and good prices too. Check it here viewtopic.php?f=116&t=35979
  6. @ Jexkid Mate after I seen your replys I asked myself "Why are you talking about mature and immature" a part of being mature is by avoiding arguments and if I look at you talking about being mature I start laughing, well the most important thing is that your saying if you're not 16 you're not mature, mate I have a friend that's 14 years old and is more mature than most of the people on this community. @ Benxamix2 I agree with you, PayPal says you have to be 18+ but they never check or do anything about it so does http://pornhub.com/ and http://redtube.com/ you have to be 18+ but with a simple click on the button "I am" its fine they won't check so this U18 and U16 things are mostly for fun, when I was 16 I went to a 18+ movie at cinema in UK and they never checked my ID or how old I am (Not only once lodes of times) and I still do and I'm 17 btw I have friends with Credit Card and they are U16
  7. No offence but your server lags bad, not sure if its because of no1servers or your scripts/maps but it does lag.
  8. serverFFS sucks, they always did and they don't even give a shit about your server, all they do is make sure your money is sent to their paypal, I was hosted by them, I was asking for help they was ignoring my tickets so I asked for my money back they ignored it again. Most of the hosting company's this days goes crazy that's why I prefer to host my server with my computer than give money and get more pissed off.
  9. Dannz0r

    Button help

    Well I have 2 GUI Windows that pops-up but I only want 1 to pop-up at one time, so I want my Login+Register window to pop-up with in a black background and after the player pressed the button to login or register I want the second GUI Window to pop-up in a 'CameraMatrix' position that I choose, here is the 'client' and 'server' side of both scripts. Login/Register Client: x,y = guiGetScreenSize() fadeCamera(true, 6, 0, 0, 0) setCameraMatrix(-1475.5, 831.18, 65.5, -1487.5, 800.18, 65.5) LoginWin = guiCreateWindow(x/1.37 - 125,y/3 - 100,280,350,"Login and Register | Panel",false) guiWindowSetMovable ( LoginWin, false ) guiWindowSetSizable ( LoginWin, false ) TabPanel = guiCreateTabPanel(0,20,260,152,false,LoginWin) TabLogin = guiCreateTab("Login | Panel",TabPanel) LblUsername = guiCreateLabel(80,13,300,16,"Nickname:",false,TabLogin) LoginUsername = guiCreateEdit(46,40,171,21,"",false,TabLogin) LblPassword = guiCreateLabel(110,72,70,16,"Password:",false,TabLogin) LoginPassword = guiCreateEdit(46,98,171,21,"",false,TabLogin) guiEditSetMasked(LoginPassword,true) TabRegister = guiCreateTab("Register | Panel",TabPanel) LblRegisterUsername = guiCreateLabel(10,4,300,16,"Nickname:",false,TabRegister) EditRegisterUsername = guiCreateEdit(46,22,171,21,"",false,TabRegister) LblRegisterPassword = guiCreateLabel(10,44,150,16,"Password:",false,TabRegister) EditRegisterPassword = guiCreateEdit(46,61,171,21,"",false,TabRegister) guiEditSetMasked(EditRegisterPassword,true) LblRegisterName = guiCreateLabel(10,83,150,16,"Real name:",false,TabRegister) EditRegisterName = guiCreateEdit(46,100,171,21,"",false,TabRegister) BtnAction = guiCreateButton(0,180,260,25,"Login or Register",false,LoginWin) guiSetVisible(LoginWin, false) logo = guiCreateStaticImage(0,217,260,120,"images/logo.png",false,LoginWin) local localPlayer = getLocalPlayer() function receiveVars( allow, name) local playername = getPlayerName(localPlayer) guiSetText(LoginUsername, "") guiSetText(EditRegisterUsername, "") if (name == "false") then guiSetVisible(LblRegisterName, false) guiSetVisible(EditRegisterName, false) end if (allow == "false") then guiDeleteTab(TabRegister, TabPanel) end guiSetSelectedTab(TabPanel, TabLogin) guiSetText(LoginUsername, playername) guiSetText(EditRegisterUsername, playername) guiSetVisible(LoginWin, true) guiBringToFront(LoginWin) guiSetInputEnabled(true) showCursor(true) end addEvent( "onSendVars", true ) addEventHandler( "onSendVars", getRootElement(), receiveVars ) function windowHandler() triggerServerEvent("onNeedVars", getLocalPlayer()) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), windowHandler) function onClickBtn(button, state) if(button == "left" and state == "up") then if(source == BtnAction) then if(guiGetSelectedTab(TabPanel) == TabLogin) then triggerServerEvent("on4XLogin", getRootElement(), localPlayer, guiGetText(LoginUsername), guiGetText(LoginPassword)) else triggerServerEvent("on4XRegister", getRootElement(), localPlayer, guiGetText(EditRegisterUsername), guiGetText(EditRegisterPassword), guiGetText(EditRegisterName)) end end end end function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(LoginWin, false) end addEvent("hideLoginWindow", true) addEventHandler("onClientGUIClick", BtnAction, onClickBtn, false) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) Login/Register Server: function on4XLogin ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if ( not isGuestAccount ( account ) ) then -- For every player that's logged in.... logOut ( player ) -- Log them out. end if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else outputChatBox ( "Wrong username or password!", player, 255, 255, 0 ) -- Output they got the details wrong. end end addEvent( "on4XLogin", true ) addEventHandler( "on4XLogin", getRootElement(), on4XLogin ) function on4XRegister ( player, user, pass, name ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else account = addAccount ( user, pass ) setAccountData ( account, "name", name) if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end end end addEvent( "on4XRegister", true ) addEventHandler( "on4XRegister", getRootElement(), on4XRegister ) function needVars() local allow_register = get("allow_register") local name_on_register = get("name_on_register") triggerClientEvent(source, "onSendVars", getRootElement(), allow_register, name_on_register) end addEvent("onNeedVars", true) addEventHandler("onNeedVars", getRootElement(), needVars) Team selection Client: --[[Panel created by: [FOTL]Danny]]-- --[[On 17th August 2011]]-- x,y = guiGetScreenSize() JobsWin = guiCreateWindow(x/3 - 170,y/3 - 20,200,320,"Team selection | Panel",false) teamsList = guiCreateGridList(0,22,186,255,false,JobsWin) column = guiGridListAddColumn( teamsList, "Teams", 0.85 ) for id, team in ipairs(getElementsByType("team")) do local row = guiGridListAddRow ( teamsList ) guiGridListSetItemText ( teamsList, row, 1, getTeamName ( team ), false, false ) guiGridListSetItemColor ( teamsList, row, 1, getTeamColor ( team ) ) end guiWindowSetMovable ( teamsList, false ) guiWindowSetMovable ( JobsWin, false ) guiWindowSetSizable ( teamsList, false ) guiWindowSetSizable ( JobsWin, false ) send = guiCreateButton(0,285,90,25,"Select",false,JobsWin) CloseButton = guiCreateButton(105,285,90,25,"Close",false,JobsWin) guiSetVisible(JobsWin, true) showCursor(true) setTimer ( showingTeams, 1000, 1) function close() if source == CloseButton then guiSetVisible(JobsWin, false) showCursor(false) end end addEventHandler ( "onClientGUIClick", root, function ( button ) if button == "left" then if source == send then local row, col = guiGridListGetSelectedItem ( teamsList ) local teamName = guiGridListGetItemText ( teamsList, row, col ) triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(), teamName ) end end end) addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), close) addEvent ( "onPlayerChooseTeam" , true ) addEventHandler ( "onPlayerChooseTeam" , root , function ( teamName ) local team = getTeamFromName ( teamName ) setPlayerTeam ( source , team ) outputChatBox("You have successfully choosed "..getTeamName(team).." team.", resPlayer, root, 0, 255, 0) end )
  10. Dont get it why everyone is complainings, I have: - AMD Athlon 64 X2 Dual-Core Processor TK-53 1.70 GHz - 2 GB RAM And in MTA 1.0.5 I have 25-30 fps, and in 1.1 I have 30-35, for me the lags are better.
  11. Thank you, its working fine. Everything is perfect.
  12. Can you make something like when player pressed select and it put him on a team to spawn him in a position? dont put the position just put the x/z/y thing give me code I do the rest please.
  13. Someone helped me now it shows the teams now I only need help when you select a team and click the button to set him on that team.
  14. Yeah 299 Spamed, 1 is a flood , yesterday I made my 100th post. By the way congratulation.
  15. Hello, I would need some help with a GridList, well I created the list and column, but I dont know how to make the column add rows with teams from the scoreboard, here is what I done until now: --[[Panel created by: [FOTL]Danny]]-- --[[On 17th August 2011]]-- teamsList = guiCreateGridList(48,172,186,255,false ) column = guiGridListAddColumn( teamsList, "Teams", 0.85 ) guiWindowSetMovable ( teamsList, false ) guiWindowSetSizable ( teamsList, false ) send = guiCreateButton(90,430,100,25, "Select" ,false) showCursor(true) guiSetVisible(JobsWin, true) And if possible to make this, when player selected a team and hit the button to set him on that team, thank you.
  16. @ Tank07: If they banned you for cheating that doesnt mean its abusive. @ To all others, well I simply agree with most of you I wouldnt like to get my server controled by other people but there is days when you want other to have access to the other server and make things right if that server is abusing your community for example, VIP was using my sever tag for 5 months I posted on the sever list spam, I have no idea how my post disappeared after a while x86 told me to post again, I did it, I waited 1 week no one done anything about it then I talked to x86 again and he removed my server tag from their name after 2 days they added it back. But its once again removed. What I really mean by that control panel is not to have access to your server scripts and stuff like that, but to have access to edit your server name, and remove fake servers. Sorry my English is a real epic.
  17. Wheres your server hosted at? Is it only you that gets that error or is it everyone? Any scripts error apears in console?
  18. I guess he doesnt have a website, he directly hosts your server with his machine. If thats true then its kinda of lame cause he can steal your scripts/maps like delux is doing.
  19. Dannz0r

    My userbars.

    Nice one, I like this one: I will add it as my sign by the way can you add a link from the website that you do it on?
  20. Tell me if I'm right, I had a file in that folder so I added it to website so you can download it as I saw other people doing it aswell. Here: http://www.2shared.com/file/sthl0E9S/cl ... 00_cg.html
  21. That message is an epic, even a message you aren't able to copy. So let me guess it says this 'Connection Timed Out' By the way wheres 'Jonas' name for hosting you. Make sure you add his tag aswell.
  22. Dannz0r

    Server list spam

    VIP Clan is using DMZ tag in their name, can you tell them to remove it please.
  23. Dannz0r

    FAKE "GMC"

    Yeah Zaya thats a big shame, with this nubcakes MTA wont have any nice servers like DDC/SHC/FFS/EPG/XIII cause someday they will copy all servers. Hopefully 1.1 will have that Panel to remove fake servers.
×
×
  • Create New...