Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Change the line 39 with this one: elseif ( mutedSerials [ getPlayerSerial ( player ) ] and mutedSerials [ getPlayerSerial ( player ) ] > 1000 ) then
  2. Where are you getting that error? at what line?
  3. Well, it depends on the spawn system you're using. Mind telling us what spawn system are you using?
  4. Must be because it's using a table to store time and element data, but it should've loading the element data when the resource starts.
  5. Castillo

    headshot

    Did you put the script as server side on the meta.xml?
  6. Castillo

    BUG

    Are you sure that it exists?
  7. Castillo

    BUG

    That error means that the radar area doesn't exist.
  8. Your table name starts with uppercase "V".
  9. Castillo

    Help SQL

    function isPlayerBanned ( thePlayer ) if ( thePlayer ) then local IP = getPlayerIP ( thePlayer ) local serial = getPlayerSerial ( thePlayer ) if ( getBan ( serial ) and getBan ( serial ) [ "banlSerial" ] ) or ( getBanFromIP ( IP ) and getBanFromIP ( IP ) [ "banlIP" ] ) then return true else return false end else return false end end
  10. Castillo

    Help SQL

    Either getBan or getBanFromIP must be returning a boolean instead of a table.
  11. Castillo

    XML Problem

    function setPlayersPosition ( path ) local xml = xmlLoadFile ( ":".. path .."/pos.xml" ) if ( xml ) then local terrorist = getPlayersInTeam ( terroristTeam ) local terroristPos = xmlFindChild ( xml, "terrorists", 0 ) local terroristPositions = xmlNodeGetChildren ( terroristPos ) local counterPos = xmlFindChild ( xml, "counter", 0 ) local counterPositions = xmlNodeGetChildren ( counterPos ) for _, v in ipairs ( terrorist ) do local node = terroristPositions [ math.random ( #terroristPositions ) ] if ( node ) then local x, y, z = unpack ( split ( xmlNodeGetValue ( node ), ", " ) ) setElementPosition ( v, x, y, z ) outputChatBox ( x ..", ".. y ..", ".. z, root ) end end end end
  12. 1: Already suggested: https://bugs.multitheftauto.com/view.php?id=6571 2: Already possible: https://wiki.multitheftauto.com/wiki/Ge ... ntPosition returns offsets, you can get world position with some maths.
  13. Castillo

    XML Problem

    function setPlayersPosition ( path ) local xml = xmlLoadFile ( ":".. path .."/pos.xml" ) if ( xml ) then local terrorist = getPlayersInTeam ( terroristTeam ) local terroristPos = xmlFindChild ( xml, "terrorist", 0 ) local terroristPositions = xmlNodeGetChildren ( terroristPos ) local counterPos = xmlFindChild ( xml, "counter", 1 ) local counterPositions = xmlNodeGetChildren ( counterPos ) for _, v in ipairs ( terrorist ) do local node = terroristPositions [ math.random ( #terroristPositions ) ] if ( node ) then local x, y, z = split ( xmlNodeGetValue ( node ), ", " ) setElementPosition ( v, x, y, z ) outputChatBox ( x ..", ".. y ..", ".. z, root ) end end end end Try it.
  14. Castillo

    Server copying

    I think that you can report it for using a name like yours here: viewtopic.php?f=114&t=31463
  15. Castillo

    Table

    function gridUpdate(row, col) local tempWepName = guiGridListGetItemText(wepGrid, row, wepGrid_ID) for i, v in ipairs(wepTable) do if v["ID"] == tonumber ( tempWepName ) then local wepID = v["ID"] local wepName = v["Name"] local wepPrice = v["Price"] local wepDual = v["Dual"] local wepClip = v["Clip"] local wepType = v["Type"] guiSetText(nameVar, tostring(wepName)) guiSetText(dualVar, tostring(wepDual)) guiSetText(clipVar, tostring(wepClip)) guiSetText(typeVar, tostring(wepType)) break end end guiGridListClear(wepGrid) for i=1,#wepTable do local row = guiGridListAddRow(wepGrid) guiGridListSetItemText(wepGrid, row, wepGrid_name, wepTable[i]["Name"], false, false) guiGridListSetItemText(wepGrid, row, wepGrid_price, wepTable[i]["Price"], false, false) guiGridListSetItemText(wepGrid, row, wepGrid_ID, wepTable[i]["ID"], false, false) end guiGridListSetSelectedItem(wepGrid, row, col) end P.D: You could store the data of each weapon in the row using guiGridListSetItemData.
  16. Castillo

    Table

    I'm sure that the problem is that it's returning a string, try doing this: if wepTable[i]["ID"] == tonumber ( tempWepName ) then
  17. Castillo

    Table

    What does "tempWepName" return?
  18. https://wiki.multitheftauto.com/wiki/SetWeaponProperty Use that function.
  19. You can set the weapon clip to have just 1 bullet, like a shotgun. You can't do this for a single player though, the change is global.
  20. Castillo

    Spawn GUI

    What do you mean by nothing? I tested it and it works fine, it shows the spawn when I die. Post the client side script.
  21. Castillo

    Spawn GUI

    addEvent ( "setSpawnVisible", true ) addEventHandler ( "setSpawnVisible",root, function ( state ) guiSetVisible ( GUIEditor.window[1], state ) -- You had put 'GUIEditor_Window' setTimer ( function ( ) showCursor ( state ) end ,1000, 1 ) end )
  22. Castillo

    Spawn GUI

    Any errors on the server side?
×
×
  • Create New...