-
Posts
460 -
Joined
-
Last visited
Everything posted by MisterQuestions
-
Forget it i just added Event "onClientRender"
-
Now work's, but doesn't generate the dxDrawImage why?
-
Still saying the same why?
-
Hey somebody help me i got an error : Loading script failed: login\client.lua:1: ' expected near '(' Here's my code..: function() LoginWindow = guiCreateWindow(370, 257, 306, 213, "cP~//Login Panel", false) guiWindowSetMovable(LoginWindow, false) guiWindowSetSizable(LoginWindow, false) userlabel = guiCreateLabel(21, 49, 75, 26, "Username:", false, LoginWindow) local font_0 = guiCreateFont(":font/digital.ttf") guiSetFont(userlabel, font_0) passlabel = guiCreateLabel(21, 93, 75, 26, "Password:", false, LoginWindow) guiSetFont(passlabel, font_0) useredit = guiCreateEdit(86, 49, 164, 30, "", false, LoginWindow) passedit = guiCreateEdit(86, 89, 164, 30, "", false, LoginWindow) registerbutton = guiCreateButton(37, 142, 102, 42, "Register", false, LoginWindow) guiSetFont(registerbutton, font_0) loginbutton = guiCreateButton(158, 142, 102, 42, "Login", false, LoginWindow) guiSetFont(loginbutton, font_0) end function ImagenFondo() dxDrawImage(1, 0, 1023, 768, ":image/fondo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end addEventHandler("onClientResourceStart",resourceRoot, function Login () local PlayerUser = guiGetText ( useredit ) local PlayerPass = guiGetText ( passedit ) if PlayerUser ~= "" and PlayerPass ~= "" then triggerServerEvent("onRequestLogin",getLocalPlayer(),PlayerUser,PlayerPass) else outputChatBox("#FF9e00Can't Login, if the problem persists contact an admin.",255,255,255,true) end end function Register () local PlayerUser = guiGetText ( useredit ) local PlayerPass = guiGetText ( passedit ) if PlayerUser ~= "" and PlayerPass ~= "" then triggerServerEvent("onRequestRegister",getLocalPlayer(),login,pass,conf) else outputChatBox("#FF9e00Can't Register, if the problem persists contact an admin.",255,255,255,true) end end function xmlCheckFile() local xmlFile = xmlLoadFile("account.xml") if not xmlFile then xmlFile = xmlCreateFile("account.xml","settings") xmlNodeSetAttribute(xmlFile,"save",tostring(false)) xmlNodeSetAttribute(xmlFile,"username","") xmlNodeSetAttribute(xmlFile,"password","") end xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) end function loadXMLInfo() local xmlFile = xmlLoadFile("account.xml") if xmlFile then local login = xmlNodeGetAttribute(xmlFile,"username") local password = xmlNodeGetAttribute(xmlFile,"password") local save = xmlNodeGetAttribute(xmlFile,"save") if save == "true" then guiSetText(loginEdit,login) guiSetText(passwordEdit,password) guiCheckBoxSetSelected(remember, true) end end xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) end function saveXmlFile() local xmlFile = xmlLoadFile("account.xml") if not xmlFile then xmlFile = xmlCreateFile("account.xml") end xmlNodeSetAttribute(xmlFile,"username",tostring(guiGetText(loginEdit))) xmlNodeSetAttribute(xmlFile,"password",tostring(guiGetText(passwordEdit))) if (guiCheckBoxGetSelected(remember)) then xmlNodeSetAttribute(xmlFile,"save",tostring(true)) else xmlNodeSetAttribute(xmlFile,"save",tostring(false)) end xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) end
-
Or when user click a image?
-
Thanks, but now? how to make like a event like "OnClienGUIClick" if im using dxrectangles on the panel?
-
Hi all im mading a login panel, but i dont know how to make get text from label of username and password, and send the inserted text to the server side to player login or register can any one help me?
-
Set Next map via AdminPanel (Sigmar)
MisterQuestions replied to MisterQuestions's topic in Scripting
but, my code doesn't set map why? whats wrong? -
Hi every one, im triying to edit sigmar, to put it on my server but i dont get the "set map" i got this fail: [2014-07-30 13:32:38] ERROR: [gamemodes]\[MultigamemodeS]\sigmar\server.lua:1190: attempt to concatenate global 'accName' (a nil value) Here is that i used to "setmap" addCommandHandler('nextmap', function( player, command, ... ) local query = #{...}>0 and table.concat({...},' ') or nil if not query then if g_ForcedNextMap then outputRace( 'Next map is ' .. getMapName( g_ForcedNextMap ), player ) else outputRace( 'Next map is not set', player ) end return end local admin = false if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then admin = true end if not _TESTING and admin == false then return end local map, errormsg = findMap( query ) if not map then outputRace( errormsg, player ) return end if g_ForcedNextMap == map then outputRace( 'Next map is already set to ' .. getMapName( g_ForcedNextMap ), player ) return end g_ForcedNextMap = map outputChatBox('Next map set to ' .. getMapName( g_ForcedNextMap ) .. ' by ' .. getPlayerName( player ), g_Root, 0, 240, 0) end )
-
Hi all! D: im having problems with my script, im creating a admin panel, i know all the things that i will use, but i dont know how to get a player list, a map list, and how to aply action to selected player of a gridlist, can any one help me?
-
In resources,race click setting, put race admin group: Admin,SuperModerator,Moderator. You dont need to add anything on acl
-
Mmmm, i still with the idea of map uploader, the server have Anti-DDoS So np
-
SMF ! I will thank you alot! please ^^ Else, is there anyway to do a mapuploader to user upload from web, then maps arrive to server?
-
Hi, in this time i wanna ask how can i use a login panel, taking the accounts from my forum,players should be registered on forum, then will login on game.
-
Skype? Or facebook i could help.
-
I will host it just i need to see it
-
So how to do it?
-
Hi i have a question, and its how to make a map uploader, from my website to server, like in web appear 'select file' and that, then when users upload the map will be on 'resources/gamemodes/race/maps' path, can anyone help me? (sorry for baf english)
-
[HELP]Edit and add things to MultiGamemode
MisterQuestions replied to MisterQuestions's topic in Scripting
Ihave a problem, i start sigmar, but doesnt show more than, wait loading and installing scripts why? the resource have admin rights -
[HELP]Edit and add things to MultiGamemode
MisterQuestions replied to MisterQuestions's topic in Scripting
Can you help me? -
Hi, i have a multigamemode from sigmar and i will edit it cause its incomplete for a race server, i need to add some things like commands: -redo -random Else i want to add nametags i have from my race.zip it is possible?
-
Hi, i have a problem, with this panel, the problem is when i want the player list, just shows me, else does't open the panel for users on the selected acl, whats wrong? Client.lua function SetRank() window_panel = guiCreateWindow(346, 141, 322, 522, "Set Rank Panel", false) guiWindowSetSizable(window_panel, false) tab_panel = guiCreateTabPanel(9, 30, 303, 482, false, window_panel) tab_rank = guiCreateTab("Set Rank", tab_panel) playergrid = guiCreateGridList(8, 15, 145, 432, false, tab_rank) column = guiGridListAddColumn( playergrid, "Players", 0.85 ) for id, player in ipairs(getElementsByType("player")) do row = guiGridListAddRow ( playergrid ) guiGridListSetItemText ( playergrid, row, column, getPlayerName ( player ), false, false ) playerName = guiGridListGetItemText ( playergrid, guiGridListGetSelectedItem ( playergrid ), 1 ) TrialMember = guiCreateButton(161, 33, 132, 38, "Give Trial-Member", false, tab_rank) Moderator = guiCreateButton(161, 129, 132, 38, "Give Moderator", false, tab_rank) Member = guiCreateButton(161, 81, 132, 38, "Give Member", false, tab_rank) SModerator = guiCreateButton(161, 177, 132, 38, "Give S.Moderator", false, tab_rank) Administrator = guiCreateButton(161, 225, 132, 38, "Give Administrator", false, tab_rank) TeamMananger = guiCreateButton(161, 273, 132, 38, "Give Team Mananger", false, tab_rank) ranklabel = guiCreateLabel(158, 332, 135, 27, "Current Rank:", false, tab_rank) showCursor(true, true) addEventHandler ("OnClientGUIClick", Trial-Member, SetTrial) end end -------Abrir por ACL------------ function ShowMePanel() if isElement(window_panel) then guiSetVisible(window_panel, open) showCursor ( true, true ) end end addEvent("OpenThaShit", true) addEventHandler("OpenThaShit", getRootElement(), ShowMePanel) -------More Functions-------- addEventHandler ("onClientGUIDoubleClick", root, function ( ) if ( source == playergrid ) then local row, col = guiGridListGetSelectedItem ( playergrid ) if ( row == -1 ) then return end local text = guiGridListGetItemText ( playergrid, row, col ) if ( text == 'PO1' ) then outputChatBox('IAM , PO1', source, 255, 0, 0 ) elseif ( text == 'PO2' ) then outputChatBox('IAM , PO2', source, 255, 0, 0 ) end end end ) --------------------------Buttons Related-------------- function setTrial() triggerServerEvent ( "TrialRank", localPlayer) showCursor (true, true) end function setMember() triggerServerEvent ( "MemberRank", localPlayer) showCursor (true, true) end function setModerator() triggerServerEvent ( "ModeratorRank", localPlayer) showCursor (true, true) end function setSModerator() triggerServerEvent ( "SmoderatorRank", localPlayer) showCursor (true, true) end function setAdmin() triggerServerEvent ( "AdminRank", localPlayer) showCursor (true, true) end function setTeamMananger() triggerServerEvent ( "TeamManangerRank", localPlayer) showCursor (true, true) end Server.lua ------Bind Keys---------- function toggleClientPanel(player) triggerClientEvent(player, "OpenThaShit", getRootElement() ) end function OpenThePanel() if isObjectInACLGroup("user."..accountName,aclGetGroup("Owner") or ("ClanMananger") or ("Admin")) then bindKey(source,"o","down", toggleClientPanel) end end -----------Functions related with client------ function TrialRank() end
-
I dont know what to do, doesn't works why?
-
But, i tried on my server, whith players, and only shows me
-
Nope, its everythins ok
