Jump to content

Absence2

Members
  • Posts

    267
  • Joined

  • Last visited

Everything posted by Absence2

  1. Hm, it should.. works for me. This is what you wanted right? also check /debugscript Did you copy the full code or just this part: for key,rbNames in pairs(rbNames) do local row = guiGridListAddRow ( rbsMenu ) guiGridListSetItemText ( rbsMenu, row, 1, rbNames, false, false ) end because if you did, change rbNames & rbsMenu to whatever you had earlier
  2. try this: rbNames = { ["roadright"] = "Small roadblock", ["helix_barrier"] = "Big Street Roadblock", ["roadworkbarrier1"] = "Sidewalk Roadblock", ["roadbarrier4"] = "Barrier", ["roadbarrier3"] = "Detour sign", ["roadbarrier6"] = "Small barrier" } rbsWindow = guiCreateWindow(0.3391,0.2832,0.3125,0.4688,"Roadblock System",true) guiWindowSetSizable(rbsWindow,false) acceptButton = guiCreateButton(0.1075,0.8813,0.3225,0.0854,"Accept",true,rbsWindow) closeButton = guiCreateButton(0.57,0.8813,0.3225,0.0854,"Close",true,rbsWindow) rbsMenu = guiCreateGridList(0.11,0.1292,0.785,0.725,true,rbsWindow) guiGridListSetSelectionMode(rbsMenu,2) guiGridListAddColumn(rbsMenu,"Roadblocks",0.5) for key,rbNames in pairs(rbNames) do local row = guiGridListAddRow ( rbsMenu ) guiGridListSetItemText ( rbsMenu, row, 1, rbNames, false, false ) end for i = 1, 6 do guiGridListAddRow(rbsMenu) end
  3. alright, so what exactly are you trying to achieve now and what didn't work? I just included your table in the gridList
  4. thing is, what most people fail to do when trying to learn something, for an example, Lua. They come here because they haven't tried enough yet. If you read it a few more times then tried it yourself, you would understand. You would then get an idea how it works, for this and other things. It's very pattern-like. Once you get a hang of it, you'll quickly understand many other things once you've came to that specific part. Also, I wont prevent you for posting here for help. I did the same thing.
  5. click: https://wiki.multitheftauto.com/wiki/GuiCreateGridList there's really no point in helping you learn here. (It's aldready written on the wiki, explained in detail too). You can simply copy-paste from there. this is what you need: for key,weaponName in pairs(shotguns) do --add a new row to our gridlist each time local row = guiGridListAddRow ( spawnScreenGridList ) --get our new row --next, we set that rows text to the weapon name. Column is 1 since the "Shotguns" column was created first. guiGridListSetItemText ( spawnScreenGridList, row, 1, weaponName, false, false ) This is how to do it: (P.S: Don't open it if you want to try yourself)
  6. so if I understood correctly, you want to disable all modifications? I assume a huge *ss table would be the only way then.
  7. Absence2

    police script

    Take the script and edit cordinates.
  8. onebip is shit if you really want this to get going in a hurry, use: http://www.daopay.com/ I haven't really checked in on it on detail but many friends of mine uses it for their Tibia servers as cellphone is easier for teenagers to use and pay with. You could check it out, I don't remember the fee they charge per transaction but it shouldn't be too high. also, I don't know how it exactly works, how to receive the money etc etc.. You'll have to register and try it out for yourself. or this: http://www.boku.com/
  9. I'm curious, how did you change the background image / wallpaper?
  10. Please, read thru the code this time. I saw you aldready had a topic about this, no idea why you would make another one. name1 = guiCreateLabel(50,10,410,20,"",false) name2 = guiCreateLabel(50,25,410,20,"",false) money1 = guiCreateLabel(300,10,410,20,"",false) money2 = guiCreateLabel(300,25,410,20,"",false) function show ( ) -- p stands for player in this case local pMoney = getPlayerMoney ( localPlayer ) local pName = getPlayerName ( localPlayer ) guiSetText ( money1, "The Money: "..pMoney ) -- Additional text guiSetText ( money2, pMoney ) guiSetText ( name1, "The Name: "..pName ) -- Additional text guiSetText ( name2, pName ) end addEventHandler ( "onClientRender", getRootElement(), show ) also, why would you need if ( playerMoney >= tonumber ( guiGetText ( money1 ) ) ) then
  11. there's more than this, I'm sure. Where's the GUI code? hint: check clientside.
  12. function globalOOC(thePlayer, commandName, ...) local logged = tonumber(getElementData(thePlayer, "loggedin")) if (logged==1) then if not (...) then outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14) else local oocEnabled = exports.global:getOOCState() message = table.concat({...}, " ") local muted = getElementData(thePlayer, "muted") if (oocEnabled==0) and not (exports.global:isPlayerAdmin(thePlayer)) then outputChatBox("OOC Chat is currently disabled.", thePlayer, 255, 0, 0) elseif (muted==1) then outputChatBox("You are currenty muted from the OOC Chat.", thePlayer, 255, 0, 0) else local players = exports.pool:getPoolElementsByType("player") local playerName = getPlayerName(thePlayer) local playerID = getElementData(thePlayer, "playerid") exports.logs:logMessage("[OOC: Global Chat] " .. playerName .. ": " .. message, 1) for k, arrayPlayer in ipairs(players) do local logged = tonumber(getElementData(arrayPlayer, "loggedin")) local targetOOCEnabled = getElementData(arrayPlayer, "globalooc") local adminlevel = exports.global:getPlayerAdminLevel(thePlayer) title = exports.global:getPlayerAdminTitle(thePlayer) local helper = tonumber(getElementData(thePlayer,"helper")) if adminlevel >= 4 then color = "#CC0000" else color = "#00ff00" end if adminlevel == 0 or getElementData(thePlayer,"hiddenadmin") == 1 then title = false end if exports.global:getPlayerDonatorLevel(thePlayer) > 0 and exports.global:getPlayerAdminLevel(thePlayer) == 0 then color = "#CC9933" title = "Donator" end if (logged==1) and (targetOOCEnabled==1) then if title and color then outputChatBox("(( [GOOC] (" .. playerID .. ") ["..color.."" ..title.. "#ffe4c4] " .. playerName .. ": " .. message.." ))",arrayPlayer, 255,228,196,true) else if helper > 0 then outputChatBox("(( [GOOC] (" .. playerID .. ") [#CC9933GameMaster#ffe4c4] " .. playerName .. ": " .. message.." ))",arrayPlayer, 255,228,196,true) else outputChatBox("(( [GOOC] (" .. playerID .. ") " .. playerName .. ": " .. message.." ))", arrayPlayer, 255,228,196,true) end end end end end end end end addCommandHandler("o", globalOOC, false, false) addCommandHandler("GlobalOOC", globalOOC) also it's helper = tonumber(getElementData(thePlayer,"helper")) and use [lua] [/ lua] tags
  13. helper = tonumber(getElementData(thePlayer,"helper")) if helper > 0 then
  14. if helper > 0 then outputChatBox("(( [GOOC] (" .. playerID .. ") [GameMaster] " .. playerName .. ": " .. message.." ))",arrayPlayer, 255,228,196,true)
  15. It seems like you just want us to do it for you, anyhow, I don't think you even have a clue what serverside & clientside are. https://wiki.multitheftauto.com/wiki/Scr ... troduction learn first, ask for help after you've tried, ask about anything that's confusing you and whatnot. Also, this is the script correct?: function globalOOC(thePlayer, commandName, ...) local logged = tonumber(getElementData(thePlayer, "loggedin")) if (logged==1) then if not (...) then outputChatBox("SYNTAX: /" .. commandName .. " [Message]", thePlayer, 255, 194, 14) else local oocEnabled = exports.global:getOOCState() message = table.concat({...}, " ") local muted = getElementData(thePlayer, "muted") if (oocEnabled==0) and not (exports.global:isPlayerAdmin(thePlayer)) then outputChatBox("OOC Chat is currently disabled.", thePlayer, 255, 0, 0) elseif (muted==1) then outputChatBox("You are currenty muted from the OOC Chat.", thePlayer, 255, 0, 0) else local players = exports.pool:getPoolElementsByType("player") local playerName = getPlayerName(thePlayer) local playerID = getElementData(thePlayer, "playerid") exports.logs:logMessage("[OOC: Global Chat] " .. playerName .. ": " .. message, 1) for k, arrayPlayer in ipairs(players) do local logged = tonumber(getElementData(arrayPlayer, "loggedin")) local targetOOCEnabled = getElementData(arrayPlayer, "globalooc") local adminlevel = exports.global:getPlayerAdminLevel(thePlayer) title = exports.global:getPlayerAdminTitle(thePlayer) if adminlevel >= 4 then color = "#CC0000" else color = "#00ff00" end if adminlevel == 0 or getElementData(thePlayer,"hiddenadmin") == 1 then title = false end if exports.global:getPlayerDonatorLevel(thePlayer) > 0 and exports.global:getPlayerAdminLevel(thePlayer) == 0 then color = "#CC9933" title = "Donator" end if (logged==1) and (targetOOCEnabled==1) then if title and color then outputChatBox("(( [GOOC] (" .. playerID .. ") ["..color.."" ..title.. "#ffe4c4] " .. playerName .. ": " .. message.." ))",arrayPlayer, 255,228,196,true) else outputChatBox("(( [GOOC] (" .. playerID .. ") " .. playerName .. ": " .. message.." ))", arrayPlayer, 255,228,196,true) end end end end end end end addCommandHandler("o", globalOOC, false, false) addCommandHandler("GlobalOOC", globalOOC) and how can we help you make gamemaster tag without the gamemaster script's arguments? Search in the gamemode.
  16. On topic: http://code.google.com/p/mtasa-blue/sou ... ail?r=3725 Off topic: post by CowTurbo on Mon Feb 14, 2011 2:55 am
  17. Absence2

    Marker problem

    I don't know how to explain it, but it'll always be like that, due to your character's given position with the freeroam CMD ( and any other unless you minus it ). Anyhow, just cut a '1' off from the 'z' argument. 14 > 13 createMarker ( 1177.53137, -1319.97766, 13.07530, "cylinder", 1, 255, 255, 0, 170 )
  18. why would you repeat something capy aldready said? It's like reading a newspaper with the very same article. A waste of time. Also, I'm just going to throw this in here due to a countless amount of posts where you:
  19. Absence2

    carfade issue

    Syntax: --bool setPlayerNametagShowing ( player thePlayer, bool showing ) --[[bool | 'bool' just means that the function returns true or false. --player | your player argument, in your case: it's 'player' check line 20: local player = getElementsByType("player") -- showing | it's either 'true' or 'false', false will hide, true will show -- now jump to line 48: setElementAlpha(player[i], 255) (( This is how you use your player argument )) idk why lua tags wont work for me.. anyhow, check these: addEventHandler ( "onClientPlayerJoin", g_Root, function() if source == g_Me then return end setPlayerNametagShowing ( source, false ) nametag.create ( source ) end ) addEventHandler ( "onClientPlayerQuit", g_Root, function() nametag.destroy ( source ) end ) addEvent ( "onClientScreenFadedOut", true ) addEventHandler ( "onClientScreenFadedOut", g_Root, function() bHideNametags = true end ) addEvent ( "onClientScreenFadedIn", true ) addEventHandler ( "onClientScreenFadedIn", g_Root, function() bHideNametags = false end ) edit: re-added the comment, then lua tags would work, so strange..
  20. Absence2

    carfade issue

    more like setPlayerNametagShowing ( player, false )
×
×
  • Create New...