Jump to content

ViRuZGamiing

Members
  • Posts

    1,050
  • Joined

  • Last visited

Everything posted by ViRuZGamiing

  1. local id = getPedOccupiedVehicle(player) local maxAccount = getVehicleMaxPassengers(id) --draw /maxAccount -- If it's Server sided pass maxAccount throught a trigger
  2. safecharname or mysql:escape_string(id) return a boolean and not a string. shouldn't safecharname be tostring(safecharname), I'm just guessing since I don't know where they're from.
  3. What is, mysql:getConnection() then? Cause I'd normally use this connection = dbConnect( "mysql", "dbname=database;host=127.0.0.1", "username", "password", "share=1" )
  4. We're not here to script for you, you do the scripting we do the helping, understand? It's rude to come on here and be like; "Here do this, do that, this is what I want". We support new scripters don't get me wrong.
  5. I use getRootElement() all the time, no problems there.
  6. You've opened parenthesis and closed them in the end but didn't close the dbQuery parenthesis. {player,username,md5password}, mysql:getConnection(), ("SELECT * FROM characters WHERE charactername='" .. safecharname .. "' AND account='" .. mysql:escape_string(id) .. "' AND cked = 0") So change it too: {player,username,md5password}, mysql:getConnection(), ("SELECT * FROM characters WHERE charactername='" .. safecharname .. "' AND account='" .. mysql:escape_string(id) .. "' AND cked = 0")
  7. you could add an if that checks if the source is in a vehicle.
  8. Well if you know how to script you can use my example to convert it into what you want. Regards Billy
  9. OMG now I feel bad for my retardness, this would work to right? regenmmPerUur = tonumber(regenmmPerUur)
  10. That's because then tonumber() is added lol *facepalm* outputServerLog(regenmmPerUur) tonumber(regenmmPerUur) if (regenmmPerUur < 1) then
  11. LUA: outputServerLog(regenmmPerUur) if (regenmmPerUur < 1) then Console: [12:32:06] 0.252 [12:32:06] ERROR: xml\server.lua:13: attempt to compare string with number When tonumber() is added, Console: [12:34:13] ERROR: xml\server.lua:14: attempt to compare string with number
  12. Hey guys, small question I'm using a tonumber() on a string which contains a number between 0 and 1 (example. 0.48) Is it possible that it makes it 0 and not 0.48 becuase I'm getting an error that I'm compairing nil to a number which tonumber's return being the nil. I've output the string and gave me the number, without tonumber() I get trying to compaire string with number. Kind regards, Billy
  13. ViRuZGamiing

    Help

    I don't know if it's true but I think it's fixed since in you're server it outputs true in chat when I got killed
  14. You could do something like this, when someone's being damaged and he's in a team he doesn't take damage. addEventHandler("onPlayerDamage", getRootElement(), function() if (getPlayerTeam(source)) then cancelEvent() end end)
  15. ViRuZGamiing

    Help

    Try adding before the if then. outputDebugString(getPlayerName(attacker)) and see if there comes a name, this'll only be the case when being attacked by a person ofcourse.
  16. ViRuZGamiing

    Help

    Yeah stop refresh start does sometimes fix it.
  17. ViRuZGamiing

    Help

    Debugscript 3 or Console errors?
  18. ViRuZGamiing

    Help

    function player_Wasted (totalAmmo, attacker)
  19. I suppose this is a DayZ thing and the gangs are set by default? I just thought his group was called dayz.
  20. Well I was about to test it but I didn't actually know how I'd see any difference thx tho this really helped me. And as far as Velocity goes I see it as some sort of Speed.
  21. Hello guys, Can anyone explain me setWindVelocity how it affects the game compaired to reallife data. Is there such things a wind direction and windspeed? Kind regards, Billy
  22. local playerTeam = getPlayerTeam (source) if (getTeamName(playerTeam) == "dayz") then end
  23. You show us a table and Getelementdata. 2 different things. You might wanna explain the thing you're trying to create.
  24. local markerName = createMarker(mx, my, mz, "cylinder", 1.0, r, g, b, 255) local gateName = createObject(model, x, y, z, rx, ry, rz) local state = false function markerHitFunction() if (state) then moveGate = moveObject(gateName, timeInMillisec, x2, y2, z2) else moveGate = moveObject(gateName, timeInMillisec, x, y, z) -- Original x, y, z coordinates end if (moveGate) then state = not state; end end addEventHandler("onMarkerHit", markerName, markerHitFunction) You just needed to fill it in the part you had, I suggest you learning LUA first cause all I did was make it for you. https://wiki.multitheftauto.com/wiki/Sc ... troduction Don't start with moving gates, start easy, outputs, set money, etc. Kind regards, Billy
×
×
  • Create New...