Jump to content

Feche1320

Members
  • Posts

    461
  • Joined

  • Last visited

Everything posted by Feche1320

  1. Currently I have SQLite, is it worth to move it to MySQL?
  2. Now, to use MySQL, do I have to use a plugin, or dbConnect, dbExec, dbQuery, etc is the same? Thanks.
  3. Is there any way to make callRemote faster? Becouse I send the call, but the result is returned 1 second after..
  4. Yes, Solidsnake14's code just worked like a charm. Thanks!
  5. if bet.sourcep[i] == source then attempt to index field 'sourcep' (a userdata value) bet.sourcep contains the source of the player that executed the command, and bet.sourcep contains the right userdata becouse when I want to get the name of it, it ouputs it correctly.. so what is wrong with it?
  6. Yes! That what I did, get a table with running resources when server starts, and when I execute the command, I compare the old table with the new table containing new resources, if the resource isn't on the old table, it's becouse is new, and I add it to another table that contains the new resources. That's all, resolved, thanks.
  7. There is no way to know if a new resource has loaded? I was looking for an event that get's called when a resource loads using /refresh or /refreshall.
  8. When I do /refresh I get on the console the new resource that it's loaded, but is there an event for it? onResourceStart and onResourcePreStart doesn't get called..
  9. Why the hell are players not synced? I see the player only standing still, and when I move, it moves on my screen, but for the other player I'm like 'freezed'.
  10. Not sure what it could be.. I stopped all resources and the problem persists.. should I cry?
  11. I am using that one, and it doesn't work Looks that I'm unlucky.. anyways, is there another way to put a ped in a vehicle?
  12. Lollllll, so why it isn't working on my private server? It's a Linux VPS, but it doesn't work on my pc either, and it's Windows, so I guess that it isn't an OS problem.. What release is the server that you tested it?
  13. Nonon, I am making a new race gamemode. So that isn't the problem.
  14. function checkPlayersVehicles() for i, player in ipairs(getElementsByType("player")) do if not isPedInVehicle(player) and getElementData(player, "State") == "alive" and isElement(__playerVehicles[player]) then local result = warpPedIntoVehicle(player, __playerVehicles[player], 0) outputDebugString("'warpPedIntoVehicle' player = " ..getPlayerName(player).. ", vehicle = " ..getVehicleName(__playerVehicles[player]).. ", result = " ..tostring(result)) end end end [2012-03-07 03:47:03] INFO: 'warpPedIntoVehicle' player = ~[ERU]~Feche, vehicle = RC Bandit, result = false [2012-03-07 03:47:05] INFO: 'warpPedIntoVehicle' player = ~[ERU]~Feche, vehicle = RC Bandit, result = false [2012-03-07 03:47:06] INFO: 'warpPedIntoVehicle' player = ~[ERU]~Feche, vehicle = RC Bandit, result = false [2012-03-07 03:47:08] INFO: 'warpPedIntoVehicle' player = ~[ERU]~Feche, vehicle = RC Bandit, result = false __playerVehicles[player] it's a variable that creates a vehicle when a player joins addEventHandler("onPlayerJoin", g_Root, function() __playerVehicles[source] = createVehicle(math.random(400, 611), 0, 0, 2) setElementSyncer(__playerVehicles[source], false) end ) So, there is no reason to return false.. plus I can't get it working.
  15. function checkPlayersVehicles() for i, player in ipairs(getElementsByType("player")) do if not isPedInVehicle(player) then warpPedIntoVehicle(player, __playerVehicles[player], 0) outputDebugString("Warping " ..getPlayerName(player).. " into vehicle " ..getVehicleName(__playerVehicles[player])) end end end warpPedIntoVehicle is just doing nothing.. and the function is in a timer.
  16. When I start my server, it's using around 300 mb of ram, passing the days it starts to increase, and the most strange thing is that even with less players it uses the same amount.
  17. Can someone tell me what does this mean/do? if not state and analogNames[v] then state = getAnalogControlState( v ) >= 0.5 -- What does >= 0.5 do?? I always used it like 'if 5 >= 5 then' .. end Thanks!
  18. I have this xml file: <ghost> <settings racerName="~[ERU]~Feche" startPosX="2495.7998046875" startPosY="-1675.5" startPosZ="13" startRotX="0" startRotY="0" startRotZ="81.996459960938" vehModel="522"></settings> <upd pKey="accelerate" pKeyState="true" posUpdX="2495.7998046875" posUpdY="-1675.5" posUpdZ="13" posUpdRotX="0" posUpdRotY="0" posUpdRotZ="81.996459960938" posUpdVelX="0" posUpdVelY="0" posUpdVelZ="0" vehHealth="1000"></upd> <upd pKey="vehicle_left" pKeyState="true" posUpdX="2495.7998046875" posUpdY="-1675.5" posUpdZ="13" posUpdRotX="0" posUpdRotY="0" posUpdRotZ="81.996459960938" posUpdVelX="0" posUpdVelY="0" posUpdVelZ="0" vehHealth="1000"></upd> <upd pKey="accelerate" pKeyState="continue" posUpdX="2495.2534179688" posUpdY="-1675.5454101563" posUpdZ="12.892325401306" posUpdRotX="10.0966796875" posUpdRotY="359.65002441406" posUpdRotZ="87.779418945313" posUpdVelX="-0.074961133301258" posUpdVelY="-0.01361764408648" posUpdVelZ="0.0040890411473811" vehHealth="1000"></upd> <upd pKey="vehicle_left" pKeyState="continue" posUpdX="2495.2534179688" posUpdY="-1675.5454101563" posUpdZ="12.892325401306" posUpdRotX="10.0966796875" posUpdRotY="359.65002441406" posUpdRotZ="87.779418945313" posUpdVelX="-0.074961133301258" posUpdVelY="-0.01361764408648" posUpdVelZ="0.0040890411473811" vehHealth="1000"></upd> <upd pKey="accelerate" pKeyState="continue" posUpdX="2493.69921875" posUpdY="-1676.0760498047" posUpdZ="12.882439613342" posUpdRotX="6.873291015625" posUpdRotY="0.0048828125" posUpdRotZ="108.62701416016" posUpdVelX="-0.14514435827732" posUpdVelY="-0.065354496240616" posUpdVelZ="-0.0011712360428646" vehHealth="1000"></upd> <upd pKey="vehicle_left" pKeyState="false" posUpdX="2493.69921875" posUpdY="-1676.0760498047" posUpdZ="12.882439613342" posUpdRotX="6.873291015625" posUpdRotY="0.0048828125" posUpdRotZ="108.62701416016" posUpdVelX="-0.14514435827732" posUpdVelY="-0.065354496240616" posUpdVelZ="-0.0011712360428646" vehHealth="1000"></upd> <upd pKey="accelerate" pKeyState="false" posUpdX="2491.25" posUpdY="-1676.6632080078" posUpdZ="12.906914710999" posUpdRotX="1.2957763671875" posUpdRotY="0.072265625" posUpdRotZ="98.93408203125" posUpdVelX="-0.19663426280022" posUpdVelY="-0.0084514888003469" posUpdVelZ="0.0021100479643792" vehHealth="1000"></upd> <upd pKey="vehicle_right" pKeyState="true" posUpdX="2491.25" posUpdY="-1676.6632080078" posUpdZ="12.906914710999" posUpdRotX="1.2957763671875" posUpdRotY="0.072265625" posUpdRotZ="98.93408203125" posUpdVelX="-0.19663426280022" posUpdVelY="-0.0084514888003469" posUpdVelZ="0.0021100479643792" vehHealth="1000"></upd> <upd pKey="accelerate" pKeyState="true" posUpdX="2488.7902832031" posUpdY="-1675.7800292969" posUpdZ="12.893157958984" posUpdRotX="359.48352050781" posUpdRotY="358.77807617188" posUpdRotZ="63.678771972656" posUpdVelX="-0.16058538854122" posUpdVelY="0.11217575520277" posUpdVelZ="-0.00058749318122864" vehHealth="1000"></upd> <upd pKey="vehicle_right" pKeyState="false" posUpdX="2488.7902832031" posUpdY="-1675.7800292969" posUpdZ="12.893157958984" posUpdRotX="359.48352050781" posUpdRotY="358.77807617188" posUpdRotZ="63.678771972656" posUpdVelX="-0.16058538854122" posUpdVelY="0.11217575520277" posUpdVelZ="-0.00058749318122864" vehHealth="1000"></upd> <upd pKey="accelerate" pKeyState="false" posUpdX="2486.5651855469" posUpdY="-1674.4409179688" posUpdZ="12.908591270447" posUpdRotX="358.16882324219" posUpdRotY="0.5020751953125" posUpdRotZ="59.870239257813" posUpdVelX="-0.16714724898338" posUpdVelY="0.095677964389324" posUpdVelZ="-0.00025970744900405" vehHealth="1000"></upd> <upd pKey="nothing" pKeyState="nothing" posUpdX="2484.3020019531" posUpdY="-1673.1380615234" posUpdZ="12.901062965393" posUpdRotX="357.06091308594" posUpdRotY="359.87268066406" posUpdRotZ="59.883239746094" posUpdVelX="-0.15138174593449" posUpdVelY="0.088615797460079" posUpdVelZ="-0.00025558628840372" vehHealth="1000"></upd> <end end="end"></end> </ghost> But, I have this problem local updTypes = { "upd", "vehiclechange", "nitro", "end" } while true do for i, t in pairs(updTypes) do info = xmlFindChild(ghost, t, count) if info then outputChatBox("Found " ..t.. " at index " ..count) end end count = count + 1 end Found upd at index 0 Found end at index 0 Found upd at index 1 Found upd at index 2 Found upd at index 3 Found upd at index 4 Found upd at index 5 Found upd at index 6 Found upd at index 7 Found upd at index 8 Found upd at index 9 Found upd at index 10 Found upd at index 11 Found end at index 0 --> I need it to be at index 11, becouse is at the end of the file.. how could I then?
  19. Hmm, isn't it like this? table = { value1 = {}, value2 = {}, value3 = {} } Or simply table = {} ?
  20. For example, I have this: local table = { value1 = {}, value2 = {}, value3 = {} } for i = 1, math.random(9999, 99999) do table.insert(table, { value1 = math.random(1, 10), value2 = math.random(500, 1000), value3 = "wawawa" ..i }) end Now, how could I clear the table, leaving it empty again? Thanks! PD: That is an example.
  21. The part that you debugged works fine.
×
×
  • Create New...