Jump to content

Musamba

Members
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Musamba

  • Rank
    Square

Details

  • Location
    Italy
  1. Is the variable "sla" in "outputChatBox(xmlNodeGetName(sla))" defined?
  2. Io ho iniziato a fare tipo 3000 gamemode mai finite ahah
  3. Bella idea davvero hunterix! Sono anche io un fan sfegatato di TWD!
  4. I don't get why I always get this error: "mapmanager: Invalid map specified" function getRandomMapCompatibleWithGamemode(gamemode) local compatibleMaps = exports.mapmanager:getMapsCompatibleWithGamemode(gamemode) if #compatibleMaps == 0 then outputDebugString("CLIMBING: No maps.") return false end local map = compatibleMaps[math.random(1, #compatibleMaps)] if exports["mapmanager"].isMap(map) then return map else outputDebugString("CLIMBING: Map not compatible("..getResourceName(map)..")") return false end
  5. addEventHandler ("onMarkerHit",getRootElement(), function (jugador) if (source == marker1) then triggerClientEvent (jugador,"showGUI",getRootElement(),jugador) elseif (source == marker2) then triggerClientEvent (jugador,"showGUI",getRootElement(),jugador) elseif (source == marker3) then triggerClientEvent (jugador,"showGUI",getRootElement(),jugador) if source == marker then triggerClientEvent (jugador,"showGUI",getRootElement(),jugador) end end end )
  6. function consoleCreateMarker ( thePlayer, commandName ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) theMarker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 ) if ( theMarker ) then outputConsole ( "Marker created successfully", thePlayer ) else outputConsole ( "Failed to create marker", thePlayer ) end end end addCommandHandler ( "createmarker", consoleCreateMarker )
  7. Ok, i solved whit an alternative method: function addMapToFavourites(theMap, thePlayer) local serial = getPlayerSerial(thePlayer) local favs = executeSQLQuery("SELECT favmaps FROM userpanelDatas WHERE serial=?", serial) executeSQLQuery("UPDATE userpanelDatas SET favmaps='"..favs[1].favmaps..","..theMap.."' WHERE serial=?", serial) end function removeMapFromFavourites(theMap, thePlayer) local serial = getPlayerSerial(thePlayer) local favs = executeSQLQuery("SELECT favmaps FROM userpanelDatas WHERE serial=?", serial) local newData = "" for i, favmap in i
  8. Sorry but you function donsn't work because "favmap" variable is not a table.. Anyway i tryed to fix my function and i did it (Thanks Jaysds1, i used the string.find function like you used it in your function), but it still doen't work and i found the problem: the string.gsub does't work! function mfavCommand(source, command) local currentMap = tostring(getResourceInfo(exports['mapmanager']:getRunningGamemodeMap(), "name")) local serial = getPlayerSerial(source) local favs = executeSQLQuery("SELECT favmaps FROM userpanelDatas WHERE serial=?", serial) if type(favs[1].favm
  9. Guys this is the full function, please help me... function mfavCommand(source, command) local currentMap = tostring(getResourceInfo(exports['mapmanager']:getRunningGamemodeMap(), "name")) local serial = getPlayerSerial(source) local favs = executeSQLQuery("SELECT favmaps FROM userpanelDatas WHERE serial=?", serial) if favs[1].favmaps then if string.find(favs[1].favmaps, currentMap) then outputChatBox("found") if string.find(favs[1].favmaps, ","..currentMap) then executeSQLQuery("UPDATE userpanelDatas SET favmaps='"..str
  10. False? This should work like this: If there is not the current map name in the string got from an SQL Query it will add it, otherwise it will remove the current map name from it... Should work but it wont...
  11. What other infos you need?
  12. I always get the output "not found", it's a command: if string.find(favs[1].favmaps, currentMap) then outputChatBox("found") if string.find(favs[1].favmaps, ","..currentMap) then executeSQLQuery("UPDATE userpanelDatas SET favmaps='"..string.gsub(favs[1].favmaps,","..currentMap, "").."' WHERE serial=?", serial) elseif string.find(favs[1].favmaps, currentMap..",") then executeSQLQuery("UPDATE userpanelDatas SET favmaps='"..string.gsub(favs[1].favmaps,currentMap..",", "").."' WHERE serial=?", serial) end
×
×
  • Create New...