Jump to content

Mike269

Members
  • Posts

    218
  • Joined

  • Last visited

Everything posted by Mike269

  1. oh cool, there's no modules in deatchmatch, ill add it, could I get your skype? Thanks, you're a good guy ^^
  2. doesn't hosted servers have that already?
  3. Look I tried with this one: http://www.mediafire.com/download/254xa ... tabase.zip but when I restart the script still says: mysql_connect failed
  4. Hello guys I just bought delux host and I would like to know how could I make a script, like "WSSdatabase" or "SAESdatabase" to connect with mysql_connect, My host have mysql and everything but I don't know how could I make a script to connect with it , help me please!
  5. Mike269

    GUI Help

    that's the problem, there's no errors in GUI if they would be , I could fix it..
  6. Mike269

    GUI Help

    Changed everything to false but there's still a problem: https://fbcdn-sphotos-h-a.akamaihd.net/ ... 57fa31f9f8
  7. Mike269

    GUI Help

    thanks man, you're so friendly, ill try it
  8. Mike269

    GUI Help

    It shows up like that: https://fbcdn-sphotos-h-a.akamaihd.net/ ... bcf053e25a and should be like: https://fbcdn-sphotos-h-a.akamaihd.net/ ... 9496a0a4a0
  9. Mike269

    GUI Help

    That's the gui of the spawn panel, When I start the spawn panel only "Window and text" of the spawn panel show up.
  10. Mike269

    GUI Help

    Hello guys, when I try to start the gui ingame only windows shows up, help please! function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] -- Apply transform local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z -- Return the transformed point end local localPlayer = getLocalPlayer() local resX, resY = guiGetScreenSize() local startX = resX * (2 / 3) local startY = 0 local windowX = resX * (1 / 3) local windowY = resY --[[ TARGET VIEW CLEANER CODE local invisibles = {} function removeInvisibles() for i,v in ipairs(invisibles) do setElementAlpha(v[1], v[2]) table.remove(invisibles, i) end end--]] local spawnPending = false function initializeEverything(resourceStarted) if getResourceName(resourceStarted) == "BCGspawn" or getResourceName(resourceStarted) == "BCGspawnmap" then local xml = xmlLoadFile(":BCGspawnmap/spawns.xml") if xml then local cityNodes = xmlNodeGetChildren(xml) cities = {} for i,node in ipairs(cityNodes) do cityname = xmlNodeGetAttribute(node, "name") local classnodes = xmlNodeGetChildren(node) cities[cityname] = {} for i2,node2 in ipairs(classnodes) do classname = xmlNodeGetAttribute(node2, "name") local spawnnodes = xmlNodeGetChildren(node2) cities[cityname][classname] = {} for i3, node3 in ipairs(spawnnodes) do skinName = xmlNodeGetAttribute(node3, "name") cities[cityname][classname][skinName] = {} cities[cityname][classname][skinName]["spawnX"] = xmlNodeGetAttribute(node3, "spawnX") cities[cityname][classname][skinName]["spawnY"] = xmlNodeGetAttribute(node3, "spawnY") cities[cityname][classname][skinName]["spawnZ"] = xmlNodeGetAttribute(node3, "spawnZ") cities[cityname][classname][skinName]["rot"] = xmlNodeGetAttribute(node3, "rot") cities[cityname][classname][skinName]["r"] = xmlNodeGetAttribute(node3, "r") cities[cityname][classname][skinName]["g"] = xmlNodeGetAttribute(node3, "g") cities[cityname][classname][skinName]["b"] = xmlNodeGetAttribute(node3, "b") local skinNode = xmlNodeGetAttribute(node3, "skins") cities[cityname][classname][skinName]["skins"] = split(skinNode, ",") cities[cityname][classname][skinName]["dimension"] = xmlNodeGetAttribute(node3, "dimension") cities[cityname][classname][skinName]["interior"] = xmlNodeGetAttribute(node3, "interior") cities[cityname][classname][skinName]["permission"] = xmlNodeGetAttribute(node3, "lock") cities[cityname][classname][skinName]["information"] = xmlNodeGetAttribute(node3, "information") cities[cityname][classname][skinName]["weapons"] = xmlNodeGetAttribute(node3, "weapons") end end end xmlUnloadFile(xml) if spawnPending then spawnPending = false drawSpawnScreen(spawnPending) end else outputDebugString("Weird, you got an error.") end end end addEventHandler("onClientResourceStart", root, initializeEverything) function drawSpawnScreen(houses) if isElement(spawnWindow) then destroyElement(spawnWindow) end if cities then labels = {} spawnWindow = guiCreateWindow(0, 697, 1920, 357, "SAUS:RPG Spawn Selection", false) guiSetProperty(spawnWindow, "NormalTextColour", "FFD55B09") guiWindowSetMovable(spawnWindow, false) guiWindowSetSizable(spawnWindow, false) labels[1] = guiCreateLabel(10, 26, 356, 321,"City Selection:",true,spawnWindow) guiLabelSetVerticalAlign(labels[1],"center") cityGridList = guiCreateGridList(8, 9, 338, 302,true,spawnWindow) guiGridListSetSelectionMode(cityGridList,2) guiGridListAddColumn(cityGridList, "City", 0.9) labels[2] = guiCreateLabel(420, 26, 356, 321,"Class Selection:",true,spawnWindow) guiLabelSetVerticalAlign(labels[2],"center") classGridList = guiCreateGridList(7, 8, 339, 303,true,spawnWindow) guiGridListSetSelectionMode(classGridList,2) guiGridListAddColumn(classGridList, "Class", 0.9) labels[3] = guiCreateLabel(1147, 26, 356, 321,"Spawn Selection:",true,spawnWindow) guiLabelSetVerticalAlign(labels[3],"center") spawnGridList = guiCreateGridList(7, 8, 339, 303,true,spawnWindow) guiGridListSetSelectionMode(spawnGridList,2) guiGridListAddColumn(spawnGridList, "Spawn", 0.9) labels[4] = guiCreateLabel(1548, 26, 356, 321,"Location Selection:",true,spawnWindow) guiLabelSetVerticalAlign(labels[4],"center") locationGridList = guiCreateGridList(7, 10, 339, 301,true,spawnWindow) guiGridListSetSelectionMode(locationGridList,2) guiGridListAddColumn(locationGridList, "Location", 0.9) local noneRow = guiGridListAddRow(locationGridList) guiGridListSetItemText(locationGridList, noneRow, 1, "Default spawn location", false, false) guiGridListSetItemData(locationGridList, noneRow, 1, false) guiGridListSetSelectedItem(locationGridList, noneRow, 1) labels[5] = guiCreateLabel(823, 245, 277, 80,"Skin Selection:",true,spawnWindow) guiLabelSetVerticalAlign(labels[5],"center") skinPrevButton = guiCreateButton(10, 21, 99, 42,"<<<",true,spawnWindow) guiSetProperty(spawnWindow, "NormalTextColour", "FFF57900") skinNextButton = guiCreateButton(168, 21, 99, 42,">>>",true,spawnWindow) guiSetProperty(spawnWindow, "NormalTextColour", "FFF57900") guiSetProperty(skinPrevButton, "Disabled", "True") guiSetProperty(skinNextButton, "Disabled", "True") skinNumberLabel = guiCreateLabel(957, 330, 59, 17,"1",true,spawnWindow) guiLabelSetVerticalAlign(skinNumberLabel,"center") guiLabelSetHorizontalAlign(skinNumberLabel,"center",false) spawnScreenOKButton = guiCreateButton(841, 132, 237, 81,"spawn",true,spawnWindow) guiSetFont(spawnScreenOKButton,"sa-header") guiSetProperty(spawnWindow, "NormalTextColour", "FFD55B09") guiSetProperty(spawnScreenOKButton, "Disabled", "True") spawnWindow2 = guiCreateWindow(664, 341, 557, 276, "Spawn Information", false) guiSetProperty(spawnWindow2, "CaptionColour", "FFF57900") guiWindowSetMovable(spawnWindow2, false) guiWindowSetSizable(spawnWindow2, false) for n, v in pairs(cities) do local row = guiGridListAddRow(cityGridList) guiGridListSetItemText(cityGridList, row, 1, n, false, false) end if houses then for n, v in ipairs(houses) do local row = guiGridListAddRow(locationGridList) guiGridListSetItemText(locationGridList, row, 1, v[1], false, false) guiGridListSetItemData(locationGridList, row, 1, {v[2], v[3], v[4]}) end end addEventHandler("onClientGUIClick", cityGridList, onCityClick) addEventHandler("onClientGUIClick", classGridList, onClassClick) addEventHandler("onClientGUIClick", spawnGridList, onSkinClick) addEventHandler("onClientGUIClick", spawnScreenOKButton, onSpawnButtonClick) addEventHandler("onClientGUIClick", skinPrevButton, onPrevSkin) addEventHandler("onClientGUIClick", skinNextButton, onNextSkin) fadeCamera(true) guiSetVisible(spawnWindow, true) guiGridListSetSelectedItem(spawnGridList, -1, 0) showCursor(true) showPlayerHudComponent ("all",false) else spawnPending = houses end end function onCityClick(button) if source == cityGridList and button == "left" then if guiGridListGetSelectedCount(cityGridList) > 0 then guiGridListClear(classGridList) local selectedRow, selectedCol = guiGridListGetSelectedItem( cityGridList ); -- get double clicked item in the gridlist local cityName = guiGridListGetItemText( cityGridList, selectedRow, selectedCol ) -- get its text local cityClasses = cities[cityName] for x, y in pairs(cityClasses) do local row = guiGridListAddRow(classGridList) guiGridListSetItemText(classGridList, row, 1, x, false, false) end guiSetProperty(spawnScreenOKButton, "Disabled", "True") guiSetProperty(skinPrevButton, "Disabled", "True") guiSetProperty(skinNextButton, "Disabled", "True") guiSetText(skinNumberLabel, 1) end end end function onClassClick(button) if source == classGridList and button == "left" then if guiGridListGetSelectedCount(cityGridList) > 0 and guiGridListGetSelectedCount(classGridList) > 0 then guiGridListClear(spawnGridList) local selectedRow, selectedCol = guiGridListGetSelectedItem( cityGridList ); -- get double clicked item in the gridlist local cityName = guiGridListGetItemText( cityGridList, selectedRow, selectedCol ) -- get its text local selectedRow, selectedCol = guiGridListGetSelectedItem( classGridList ); -- get double clicked item in the gridlist local className = guiGridListGetItemText( classGridList, selectedRow, selectedCol ) -- get its text local classSkins = cities[cityName][className] for x, y in pairs(classSkins) do local row = guiGridListAddRow(spawnGridList) guiGridListSetItemText(spawnGridList, row, 1, x, false, false) end guiSetProperty(spawnScreenOKButton, "Disabled", "True") guiSetProperty(skinPrevButton, "Disabled", "True") guiSetProperty(skinNextButton, "Disabled", "True") guiSetText(skinNumberLabel, 1) end end end function onSkinClick(button) if source == spawnGridList and button == "left" then if guiGridListGetSelectedCount(cityGridList) > 0 and guiGridListGetSelectedCount(classGridList) > 0 and guiGridListGetSelectedCount( spawnGridList ) > 0 then local selectedRow, selectedCol = guiGridListGetSelectedItem( cityGridList ); -- get double clicked item in the gridlist local cityName = guiGridListGetItemText( cityGridList, selectedRow, selectedCol ) -- get its text local selectedRow, selectedCol = guiGridListGetSelectedItem( classGridList ); -- get double clicked item in the gridlist local className = guiGridListGetItemText( classGridList, selectedRow, selectedCol ) -- get its text local selectedRow, selectedCol = guiGridListGetSelectedItem( spawnGridList ); -- get double clicked item in the gridlist local skinName = guiGridListGetItemText( spawnGridList, selectedRow, selectedCol ) -- get its text guiSetProperty(spawnScreenOKButton, "Disabled", "False") guiSetProperty(skinPrevButton, "Disabled", "False") guiSetProperty(skinNextButton, "Disabled", "False") guiSetText(infoMemo, cities[cityName][className][skinName]["information"]) guiSetText(skinNumberLabel, 1) renderSkin() end end end function onSpawnButtonClick(button) if source == spawnScreenOKButton and button == "left" then if guiGridListGetSelectedCount( cityGridList ) > 0 and guiGridListGetSelectedCount( classGridList ) > 0 and guiGridListGetSelectedCount( spawnGridList ) > 0 then local selectedRow, selectedCol = guiGridListGetSelectedItem( cityGridList ); -- get double clicked item in the gridlist local cityName = guiGridListGetItemText( cityGridList, selectedRow, selectedCol ) -- get its text local selectedRow, selectedCol = guiGridListGetSelectedItem( classGridList ); -- get double clicked item in the gridlist local className = guiGridListGetItemText( classGridList, selectedRow, selectedCol ) -- get its text local selectedRow, selectedCol = guiGridListGetSelectedItem( spawnGridList ); -- get double clicked item in the gridlist local skinName = guiGridListGetItemText( spawnGridList, selectedRow, selectedCol ) -- get its text local spawninfo = cities[cityName][className][skinName] local skinID = spawninfo['skins'][tonumber(guiGetText(skinNumberLabel))]
  11. Could you give me a working link? would be great
  12. Hello guys do you know any application to move PSC money to PayPal? I don't have paypal connected with any bank card but as I know I can use that money for paying hosts etc, please help me , thanks
  13. But none answered can you explain me?
  14. I have that script but it's kind a weird to add more vehicles and skins, would be cool if anyone could add me and help, thanks! Skype - jack.vas1
  15. Hello guys, I'm about to buy another host because my host doesn't have "mysql" could you guys tell me what's better if you have MySql databases, thanks!
  16. Hello guys I want to know if there's a good MTA host with mysql and everything the best for pay safe card cuz on the last I bought waltsu hosting and I really don't like it , it doesn't even have mysql_connect, please tell me for a good one, thanks!
  17. Hello guys I was always asking myself how did others change color of house on sale / save disk I would really like to know if anyone can tell me , thanks!
  18. Hello guys does anyone know any script that include optional mods? Because I have a server and I don't want to make players wait cuz of skins, mods and weapons. A command to turn the gui on could be like /mods and then you click download on mod you like. Thanks!
  19. Mike269

    f11 blips

    but if i have this how can I turn off normal blips then?
  20. Mike269

    f11 blips

    yeah but if i edit that, only i will see it right?
  21. Mike269

    f11 blips

    Hello guys, I just made blips for my radar but I want to use them for F11 map too, it's possible to do it? There should be script with normal blips in the server already right? I just need the name to replace the pictures with mine. Thanks!
  22. but i still don't understand what should I do
  23. thanks madex, should I script something there or I just have to read those links and install it?
×
×
  • Create New...