qaisjp Posted August 29, 2011 Share Posted August 29, 2011 my new ingame name is [FG]Noob Link to comment
CapY Posted August 29, 2011 Author Share Posted August 29, 2011 Okay sure , then i will be use your gang name too . Link to comment
Twisted Posted August 29, 2011 Share Posted August 29, 2011 Not only are you a script stealer but Iron Snake owner told you to remove his server name so nice server name stealing too you fag Link to comment
Cadu12 Posted August 29, 2011 Share Posted August 29, 2011 CapY, are you stealing, they you are gay dude. Oh yep, i remember that you want ask MTA Team to change client-side to server-side, thats you want stealing. proof: viewtopic.php?f=102&t=35190 if he deleted his topic: It will be good to have Client to Server side conventer so scripting will be easier for others and ofcourse if MTA team can make it . Link to comment
qaisjp Posted August 29, 2011 Share Posted August 29, 2011 Still an admin eh? lol cadu, win post. Link to comment
AGENT_STEELMEAT Posted August 29, 2011 Share Posted August 29, 2011 local rootElement = getRootElement() local thisResourceRoot = getResourceRootElement(getThisResource()) local pagesXml local wndHelp, wndBlock, tPanel, btnClose local tab = {} local memo = {} local popupQueue = {} local Grid = {} local HELP_KEY = "F9" local HELP_COMMAND = "gamehelp" local POPUP_TIMEOUT = 15000 --ms local FADE_DELTA = 10 --alpha per frame local MAX_ALPHA = 10 addEvent("doShowHelp", true) addEvent("doHideHelp", true) addEvent("onHelpShown") addEvent("onHelpHidden") addEventHandler("onClientResourceStart", thisResourceRoot, function () wndHelp = guiCreateWindow(.2, .2, .6, .6, "Help", true) wndBlock = guiCreateWindow(0, 0, 1, 1, "", true) tPanel = guiCreateGridList(0.2086 ,0.1629, 0.6000, 0.6000, true, wndHelp) btnClose = guiCreateButton(.4, .92, .2, .08, "Close", true, wndHelp) guiSetVisible(wndHelp, false) guiSetVisible(wndBlock, false) guiWindowSetSizable(wndHelp, false) guiSetAlpha(wndBlock, 0) addEventHandler("onClientGUIClick", btnClose, function() if source == this then clientToggleHelp(false) end end ) pagesXml = xmlLoadFile("seen.xml") if not pagesXml then pagesXml = xmlCreateFile("seen.xml", "seen") end for i, resourceRoot in ipairs(getElementsByType("resource")) do --!w local resource = getResourceFromName(getElementID(resourceRoot)) if resource then addHelpTabFromXML(resource) end end addCommandHandler(HELP_COMMAND, clientToggleHelp) bindKey(HELP_KEY, "down", clientToggleHelp) end ) addEventHandler("onClientResourceStop", thisResourceRoot, function() showCursor(false) end ) -- exports function showHelp() return clientToggleHelp(true) end addEventHandler("doShowHelp", rootElement, showHelp) function hideHelp() return clientToggleHelp(false) end addEventHandler("doHideHelp", rootElement, hideHelp) function addHelpTab(resource, showPopup) if showPopup == nil then showPopup = true end -- block duplicates if tab[resource] then return false end local tabtext = getResourceName(resource) local helpnode = getResourceConfig(":" .. getResourceName(resource) .. "/help.xml") if helpnode then local nameattribute = xmlNodeGetAttribute(helpnode, "title"); if nameattribute then tabtext = nameattribute; end end tab[resource] = guiCreateGridList( tabtext , tPanel) if showPopup then addHelpPopup(resource) end return tab[resource] end function removeHelpTab(resource) if not tab[resource] then return false end if memo[resource] then destroyElement(memo[resource]) memo[resource] = nil end guiGridListClear(tab[resource], tPanel) tab[resource] = nil return true end addEventHandler("onClientResourceStop", rootElement, removeHelpTab) --private function addHelpTabFromXML(resource) -- block duplicates if tab[resource] then return false end local helpnode = getResourceConfig(":"..getResourceName(resource).."/help.xml") if helpnode then local helptext = xmlNodeGetValue(helpnode) local showPopup = not (xmlNodeGetAttribute(helpnode, "popup") == "no") if helptext then guiGridListAddRow(resource, showPopup) memo[resource] = guiCreateMemo(.01800, .00040, .08080, .09960, helptext, true, tab[resource]) guiMemoSetReadOnly(memo[resource], true) end end end addEventHandler("onClientResourceStart", rootElement, addHelpTabFromXML) function clientToggleHelp(state) if state ~= true and state ~= false then state = not guiGetVisible(wndHelp) end guiSetVisible(wndHelp, state) guiSetVisible(wndBlock, state) if state == true then triggerEvent("onHelpShown", localPlayer) guiBringToFront(wndBlock) guiBringToFront(wndHelp) showCursor(true) else triggerEvent("onHelpHidden", localPlayer) showCursor(false) end return true end local function fadeIn(wnd) local function raiseAlpha() local newAlpha = guiGetAlpha(wnd) + FADE_DELTA if newAlpha <= MAX_ALPHA then guiSetAlpha(wnd, newAlpha) else removeEventHandler("onClientRender", rootElement, raiseAlpha) end end addEventHandler("onClientRender", rootElement, raiseAlpha) end local function fadeOut(wnd) local function lowerAlpha() local newAlpha = guiGetAlpha(wnd) - FADE_DELTA if newAlpha >= 0 then guiSetAlpha(wnd, newAlpha) else removeEventHandler("onClientRender", rootElement, lowerAlpha) destroyElement(wnd) table.remove(popupQueue, 1) if #popupQueue > 0 then showHelpPopup(popupQueue[1]) end end end addEventHandler("onClientRender", rootElement, lowerAlpha) end function addHelpPopup(resource) local xmlContents = xmlNodeGetValue(pagesXml) local seenPages = split(xmlContents, string.byte(',')) local resourceName = getResourceName(resource) for i, page in ipairs(seenPages) do if page == resourceName then return end end xmlNodeSetValue(pagesXml, xmlContents..resourceName..",") xmlSaveFile(pagesXml) table.insert(popupQueue, resource) if #popupQueue == 1 then showHelpPopup(resource) end end function showHelpPopup(resource) local screenX, screenY = guiGetScreenSize() local wndPopup = guiCreateWindow(0, screenY - 20, screenX, 0, '', false) --350 local restitle = getResourceName(resource) local helpnode = getResourceConfig(":" .. getResourceName(resource) .. "/help.xml") if helpnode then local nameattribute = xmlNodeGetAttribute(helpnode, "title"); if nameattribute then restitle = nameattribute; end end local text = "Help page available for ".. restitle .."! ".. "Press "..HELP_KEY.." or type /"..HELP_COMMAND.." to read it." guiSetText(wndPopup, text) guiSetAlpha(wndPopup, 0) guiWindowSetMovable(wndPopup, false) guiWindowSetSizable(wndPopup, false) fadeIn(wndPopup) setTimer(fadeOut, POPUP_TIMEOUT, 1, wndPopup) end You forgot to set the gridlist as a child of the main window. I haven't tested this - but try it. Also, before I get hate mail - I don't care. Link to comment
CapY Posted August 29, 2011 Author Share Posted August 29, 2011 (edited) I will look for it John . And Qaisjp why you are hiding your name ? And this is not good place for a fight , we can get banned . Edited August 29, 2011 by Guest Link to comment
qaisjp Posted August 29, 2011 Share Posted August 29, 2011 You said you were not an fg admin any more. Link to comment
CapY Posted August 29, 2011 Author Share Posted August 29, 2011 (edited) Times change , peoples change , they becomes better 'n better They try to fix old problems . Edited August 29, 2011 by Guest Link to comment
AGENT_STEELMEAT Posted August 29, 2011 Share Posted August 29, 2011 How about you stop pointing fingers at each other? 1 - You are BOTH noobs. CapY can't manage to fix a SINGLE argument in his script - it was so painfully obvious. The rest of you are noobs for starting a flame war in the scripting forum for little reason. Take the shit elsewhere. 2 - The script itself sucks. If ya'll are going to argue about something like this, do it in private. This is a place to ask questions, get answers, and have general discussion about SCRIPTING. Link to comment
[DKR]Jake Posted August 29, 2011 Share Posted August 29, 2011 And Qaisjp why you are hiding your name ? Let the people know for such an asshole : http://imageshack.us/f/820/qaisjpnoob.png/ And this is not good place for a fight , we can get banned . Qais is hiding his name because he has a right not to release his own personal information, much like you have a right not to have yours released. You can both get banned illegal activies as you have both now violated the Data Protection Act by releasing the names of eachother and/or eachothers facebook accounts, CapY is the worse one off because he did it in retaliation to Qais even though you're both as bad as eachother. CapY, you didn't even have the decency to hide people's names in that screenshot who have nothing to do with this, if they chose to report that then good luck with that one. Link to comment
CapY Posted August 29, 2011 Author Share Posted August 29, 2011 Jake i edited the post and John... +1 Link to comment
qaisjp Posted August 29, 2011 Share Posted August 29, 2011 How about you stop pointing fingers at each other?1 - You are BOTH noobs. CapY can't manage to fix a SINGLE argument in his script - it was so painfully obvious. The rest of you are noobs for starting a flame war in the scripting forum for little reason. Take the :~ elsewhere. 2 - The script itself sucks. If ya'll are going to argue about something like this, do it in private. This is a place to ask questions, get answers, and have general discussion about SCRIPTING. 1. I am a noob. I admit 2. True. 3. haha, i didn't start it.. Link to comment
CapY Posted August 29, 2011 Author Share Posted August 29, 2011 3. haha, i didn't start it.. Neither me .. Twisted did, but i will stop . @John atleast gridlist is now child of help window, but memo is still out , it looks like this : http://imageshack.us/f/402/mtascreen20110829182149.png/ Link to comment
CapY Posted August 29, 2011 Author Share Posted August 29, 2011 (edited) Bump * Can you please remove that picture Qais ? Edited August 29, 2011 by Guest Link to comment
AGENT_STEELMEAT Posted August 29, 2011 Share Posted August 29, 2011 Stop. Don't reply to this. Just let it go. Don't post "Yeah, we should end this". Don't click the reply button. /thread Link to comment
CapY Posted August 29, 2011 Author Share Posted August 29, 2011 But just look on your script results . Link to comment
[DKR]Jake Posted August 29, 2011 Share Posted August 29, 2011 CapY, instead of asking/spamming the forums asking people to help, why don't you try and figure it out yourself for once. Sit there and think about why it's going wrong, use the wiki for assistance. Try and figure something out on your own for once, if you keep relying on the community you won't learn. Link to comment
zerb Posted August 29, 2011 Share Posted August 29, 2011 I am going to investigate this thread. Topic locked. Link to comment
Recommended Posts