Jump to content

papam77

Members
  • Posts

    517
  • Joined

  • Last visited

Everything posted by papam77

  1. I have this and still can move with gui local clientContainer = {} clientContainer.createLogin = function() guiWindowSetMovable ( window, false ) clientContainer.GUI = {} local resX, resY = guiGetScreenSize(); clientContainer.GUI.root = guiCreateWindow(resX/2-300/2, resY/2-500.5/2, 300, 500.5, 'Log in', false) -- USERNAME clientContainer.GUI.UserLab = guiCreateLabel(10,25,75,25,'Username:',false,clientContainer.GUI.root) clientContainer.GUI.UserEdt = guiCreateEdit(70,22.5,225,25,'', false,clientContainer.GUI.root) -- PASSWORD clientContainer.GUI.PassLab = guiCreateLabel(10,55,75,25,'Password:',false,clientContainer.GUI.root) clientContainer.GUI.PassEdt = guiCreateEdit(70,52.5,225,25,'', false,clientContainer.GUI.root) guiEditSetMasked(clientContainer.GUI.PassEdt, true) -- BUTTONS clientContainer.GUI.Check = guiCreateCheckBox(10,82.5,75,25,'save Data!',false,false,clientContainer.GUI.root) clientContainer.GUI.LogButt = guiCreateButton(216,82.5,75,25,'Log In',false,clientContainer.GUI.root) -- HANDLER addEventHandler('onClientGUIClick', clientContainer.GUI.LogButt, function() local user = guiGetText(clientContainer.GUI.UserEdt); local pass = guiGetText(clientContainer.GUI.PassEdt); if pass and pass ~= '' and user and user ~= '' then triggerServerEvent('onClientLogins', localPlayer, user, pass) end end, false) -- XML if fileExists('acc.xml') then local accRoot = xmlLoadFile('acc.xml') if accRoot then for index, child in next, xmlNodeGetChildren(accRoot) do if xmlNodeGetAttribute(child,'Save') == 'true' then guiSetText(clientContainer.GUI.UserEdt,xmlNodeGetAttribute(child,'Username')) guiSetText(clientContainer.GUI.PassEdt,xmlNodeGetAttribute(child,'Password')) guiCheckBoxSetSelected(clientContainer.GUI.Check,true) end end xmlUnloadFile(accRoot) end else local accRoot = xmlCreateFile('acc.xml','authentication') if accRoot then local settings = xmlCreateChild(accRoot,'Settings') -- settings xmlNodeSetAttribute(settings,'Username','') xmlNodeSetAttribute(settings,'Password','') xmlNodeSetAttribute(settings,'Save','false') xmlSaveFile(accRoot) xmlUnloadFile(accRoot) end end showCursor(true) end addEventHandler('onClientResourceStart', resourceRoot, clientContainer.createLogin) clientContainer.onClientSuccessfullyLogin = function() -- XML SAVE if ( guiCheckBoxGetSelected(clientContainer.GUI.Check) == true ) then local accRoot = xmlLoadFile('acc.xml') if accRoot then for index, child in next, xmlNodeGetChildren(accRoot) do xmlNodeSetAttribute(child,'Save','true') xmlNodeSetAttribute(child,'Username',guiGetText(clientContainer.GUI.UserEdt)) xmlNodeSetAttribute(child,'Password',guiGetText(clientContainer.GUI.PassEdt)) end xmlSaveFile(accRoot) xmlUnloadFile(accRoot) end end destroyElement(clientContainer.GUI.root) showCursor(false) end addEvent('onClientSuccessfullyLogin', true) addEventHandler('onClientSuccessfullyLogin', root, clientContainer.onClientSuccessfullyLogin)
  2. How can lock moving with gui panel ?
  3. papam77

    Hunter arena

    Yes, but only for message i need move to selected Hunters. THis http://www.mtasource.net/1-post1.html but i haven't VIP
  4. papam77

    Hunter arena

    Hello, how can make Hunter arena but like this: When will player dead he/she will see text "Press F for join to Hunter Arena" and if he/she will press F he/she will be move to Hunter Arena. But arena must be in DM mod cuz i wanna that if every player will fall all players from hunter arena will be move to nextmap. I think that WTF-MTA had this script but i am not sure about it... Anyway is it anywhere for free or must do it ?
  5. Shut up and take my money !!!!
  6. papam77

    Stolen Race

    Hello, i today was on one server and i saw that this is race stolen. I told to CL that he stolen this race and he told me that is it true. MSGs: EaG//DeeJay: Výsměch tobě, stažené race EaG//C1sK0: existuje EaG//C1sK0: ty neanertalec ~|69|~L!Fe: boze posrany slovaci Press 'M' to toggle the music on/off! [TIP]You saw a hacker or bug? Report it to Admin. Player -NeX//WaRTeK bought for $3000 nitro! (/nos) EaG//C1sK0: google.sk EaG//C1sK0: .. EaG//C1sK0: deejay ? EaG//C1sK0: víš za co mi dal jeden z ffs mute na 20 minut ? ~|69|~L!Fe is first! He wins 120 points and 480$! -NeX//WaRTeK: deejay...er race asi težko stáhnu Map '[DM]Console_-V-2-_CoLoRs_Of_DeAtH' started. Ghostmode activate! Not rated yet [/rate 1-10] EaG//C1sK0: za tohle deejay EaG//C1sK0: http://www.beeg.com Free Porn FULL HD Watch it NOW !!!! EaG//C1sK0: xDD This map was downloaded from [url=http://www.MTASource.net]http://www.MTASource.net[/url] Visit [url=http://www.MTASource.net]http://www.MTASource.net[/url] to download more maps. Also you can upload or sell your map here. Console: [DM]Console_-V-2-_CoLoRs_Of_DeAtH. Console: Press 'M' to toggle the music On/Off. Console: Version 1 Console: Enjoy: The MAP! EaG//C1sK0: mute na 20 minut na ffs EaG//DeeJay: jasně a proč tohle race je na donemap.weebly.com , [TIP]You saw a hacker or bug? Report it to Admin. [Nextmap]: [DM] Fancy vol.9 - The Dark Feronia set by -NeX//WaRTeK EaG//DeeJay: uplně stejné ? EaG//DeeJay: hm. ? -NeX//WaRTeK: protoźe to tam asi dali? tenhlre race sem poctive ukradl z er "-NeX//WaRTeK: protoźe to tam asi dali? tenhlre race sem poctive ukradl z er :D" IN ENG = I stolen this race from ER server. Server IP: mtasa://85.118.131.200:22026 Thank you for reading
  7. Hello, i have got an idea about Points. If player will reach 10 Hunter then he will get 1 Point. 10x Hunter = 1* Point (GP - Game Point) How can make it ? Which function for transfer hunters to points ?
  8. papam77

    Tops text

    Still don't work.
  9. Ty, and how can make it for everyone ? I made it on my resolution 1920x1080.
  10. papam77

    Tops text

    Hello, how can move up MapName in tops ? local bankgothic = guiCreateFont("bankgothic.ttf",11) local x,y = guiGetScreenSize() -- -- toptimes_client.lua -- Created = {} CToptimes = {} CToptimes.__index = CToptimes CToptimes.instances = {} g_Settings = {} --------------------------------------------------------------------------- -- Client -- Handle events from Race -- -- This is the 'interface' from Race -- --------------------------------------------------------------------------- addEventHandler('onClientResourceStart', g_ResRoot, function() triggerServerEvent('onLoadedAtClient_tt', g_Me) end ) addEvent('onClientMapStarting', true) addEventHandler('onClientMapStarting', getRootElement(), function(mapinfo) outputDebug( 'TOPTIMES', 'onClientMapStarting' ) if g_CToptimes then g_CToptimes:onMapStarting(mapinfo) end end ) addEvent('onClientMapStopping', true) addEventHandler('onClientMapStopping', getRootElement(), function() outputDebug( 'TOPTIMES', 'onClientMapStopping' ) if g_CToptimes then g_CToptimes:onMapStopping() end end ) addEvent('onClientPlayerFinish', true) addEventHandler('onClientPlayerFinish', getRootElement(), function() outputDebug( 'TOPTIMES', 'onClientPlayerFinish' ) if g_CToptimes then g_CToptimes:doAutoShow() end end ) addEvent('onClientSetMapName', true) addEventHandler('onClientSetMapName', getRootElement(), function(manName) if g_CToptimes then g_CToptimes:setWindowTitle(manName) end end ) function updateSettings(settings, playeradmin) outputDebug( 'TOPTIMES', 'updateSettings' ) if g_CToptimes then if settings and settings.gui_x and settings.gui_y then g_CToptimes:setWindowPosition( settings.gui_x, settings.gui_y ) g_CToptimes.startshow = settings.startshow end -- If admin changed this setting manually, then show the table to him if playeradmin == getLocalPlayer() then g_CToptimes:doToggleToptimes(true) end end end --------------------------------------------------------------------------- -- -- CToptimes:create() -- -- -- --------------------------------------------------------------------------- function CToptimes:create() outputDebug ( 'TOPTIMES', 'CToptimes:create' ) local id = #CToptimes.instances + 1 CToptimes.instances[id] = setmetatable( { id = id, bManualShow = false, -- via key press bAutoShow = false, -- when player finished bGettingUpdates = false, -- server should send us updates to the toptimes listStatus = 'Empty', -- 'Empty', 'Loading' or 'Full' gui = {}, -- all gui items lastSeconds = 0, targetFade = 0, currentFade = 0, autoOffTimer = Timer:create(), hasTimes = false }, self ) CToptimes.instances[id]:postCreate() return CToptimes.instances[id] end --------------------------------------------------------------------------- -- -- CToptimes:destroy() -- -- -- --------------------------------------------------------------------------- function CToptimes:destroy() self:setHotKey(nil) self:closeWindow() self.autoOffTimer:destroy() CToptimes.instances[self.id] = nil self.id = 0 end --------------------------------------------------------------------------- -- -- CToptimes:postCreate() -- -- -- --------------------------------------------------------------------------- function CToptimes:postCreate() self:openWindow() self:setWindowPosition( 0.7, 0.02 ) self:setHotKey('F5') end --------------------------------------------------------------------------- -- -- CToptimes:openWindow() -- -- -- --------------------------------------------------------------------------- function CToptimes:openWindow () if self.gui['container'] then return end self.size = {} self.size.x = 320 self.size.y = 300 local sizeX = self.size.x local sizeY = self.size.y -- windowbg is the root gui element. -- windowbg holds the backround image, to which the required alpha is applied self.gui['windowbg'] = guiCreateStaticImage(100, 100, sizeX, sizeY, 'img/timepassedbg.png', false, nil) guiSetAlpha(self.gui['windowbg'], 1) guiSetVisible( self.gui['windowbg'], false ) -- windowbg as parent: self.gui['container'] = guiCreateStaticImage(0,0.1,1,1, 'img/blank.png', true, self.gui['windowbg']) guiSetProperty ( self.gui['container'], 'InheritsAlpha', 'false' ) -- container as parent: self.gui['paneTimes'] = guiCreateStaticImage(0,0,1,1, 'img/blank.png', true, self.gui['container']) self.gui['bar'] = guiCreateStaticImage(0, 0, sizeX, 0, 'img/timepassedbg.png', false, self.gui['container']) guiSetAlpha(self.gui['bar'], 1) self.gui['title0'] = guiCreateLabel(0, 2, sizeX, 30, '', false, self.gui['windowbg'] ) guiLabelSetHorizontalAlign ( self.gui['title0'], 'center' ) guiSetFont(self.gui['title0'], "default-bold-small") guiLabelSetColor ( self.gui['title0'],255,127,0) self.gui['title'] = guiCreateLabel(0, 2, sizeX, 30, '', false, self.gui['container'] ) guiLabelSetHorizontalAlign ( self.gui['title'], 'center' ) guiSetFont(self.gui['title'], "default-bold-small") guiLabelSetColor ( self.gui['title'],255,127,0, 0 ) self.gui['header'] = guiCreateLabel(19, 21, sizeX-30, 15, ' # Time Name', false, self.gui['container'] ) guiSetFont(self.gui['header'], bankgothic) guiLabelSetColor ( self.gui['header'],255,127,0 ) self.gui['headerul'] = guiCreateLabel(0, 21, sizeX, 15," ", false, self.gui['container'] ) guiLabelSetHorizontalAlign ( self.gui['headerul'], 'center' ) guiLabelSetColor ( self.gui['headerul'], 255,127,0 ) self.gui['paneLoading'] = guiCreateStaticImage(0,0,1,1, 'img/blank.png', true, self.gui['container']) -- paneLoading as parent: self.gui['busy'] = guiCreateLabel(sizeX/4, 38, sizeX/2, 15, 'Please wait', false, self.gui['paneLoading'] ) self.gui['busy2'] = guiCreateLabel(sizeX/4, 53, sizeX/2, 15, 'until next map', false, self.gui['paneLoading'] ) guiLabelSetHorizontalAlign ( self.gui['busy'], 'center' ) guiLabelSetHorizontalAlign ( self.gui['busy2'], 'center' ) guiSetFont(self.gui['busy'], "default-bold-small") guiSetFont(self.gui['busy2'], "default-bold-small") -- paneTimes as parent: -- All the labels in the time list self.gui['listTimes'] = {} self:updateLabelCount(12) WszystkieToptimy = {} end --------------------------------------------------------------------------- -- -- CToptimes:closeWindow() -- -- -- --------------------------------------------------------------------------- function CToptimes:closeWindow () destroyElement( self.gui['windowbg'] ) self.gui = {} end --------------------------------------------------------------------------- -- -- CToptimes:setWindowPosition() -- -- -- --------------------------------------------------------------------------- function CToptimes:setWindowPosition ( gui_x, gui_y ) if self.gui['windowbg'] then local screenWidth, screenHeight = guiGetScreenSize() local posX = screenWidth/2 + 63 + ( screenWidth * (gui_x - 0.56) ) local posY = 14 + ( screenHeight * (gui_y - 0.01) ) local posXCurve = { {0, 0}, {0.7, screenWidth/2 + 63}, {1, screenWidth - self.size.x} } local posYCurve = { {0, 0}, {0.02, 59}, {1, screenHeight - self.size.y} } -- 1280 0-1000 -- 0.0 = 1280/2 - 140 = 0 -- 0.5 = 1280/2 - 140 = 500
  11. My friend wrote that exist any program for this is it true ?
  12. Hello, i have problem with timer. timeleftbg = guiCreateStaticImage(screenWidth/2-108/2, 15, 108, 24, 'img/timeleft.png', false, nil), timeleft = guiCreateLabel(screenWidth/2-108/2, 19, 108, 30, '', false), I need add times to frames. How ?
  13. Hello, i have problem i don't see color in Nextmap: but i see #HEXNextmap: Why ? mapdisplay = dxText:create('#ff7f00Map: #ffffffnone', 2, screenHeight - dxGetFontHeight(0.7, 'bankgothic')/2, false, 'bankgothic', 0.7, 'left')
  14. I have this code <<< <<< Events: onGamemodeJoin onClientGamemodeJoin onGamemodeQuit onClientGamemodeQuit Export: setPlayerGamemode(player, id) getPlayerGamemode(player) getPlayersInGameMode(id, gamemode) "onGamemodeJoin" "id == "race"
  15. Hello, i have problem. My lobby is as gamemode but when i join to gamemode race lobby is OFF and race ON I need join no change gamemodes. Why ?
  16. Hello, i have one ask how can make groups in a chat ? example: /lang CZ /lang SK /lang TR /lang DE etc.... How can do it ?
  17. Ty. And how can make bind around NPC ? max. 5 meters around. You must be 5m maximum near to NPC and press "F" for call function.
  18. I only need one script with this functions for example
  19. Hello, i need any script with this functions for example callServerFunction - callClientFunction. Please download for any script with it
  20. papam77

    Ped function

    Or how can start gamemode in Lobby ? Any function for start gamemode as has TG or ffs And i don't wanna invisible players
  21. papam77

    Ped function

    Hello, i have problem with Ped Functions. http://www.img.tpx.cz/uploads/function.png I need to add function that if player will press "F" he will move to DM arena. Example for startResource please ? And how can make that other players will in ghostmode ?
  22. papam77

    Time Lock

    Hello, how can lock time in lua ? I need it for lobby.
  23. Hello, i wanna do that if player will around NPC (ped) and then he/she will press F and he/she will be move to DM arena as on TG. More arenas on one server. How can do it ?
×
×
  • Create New...