Jump to content

Noki

Members
  • Posts

    851
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Noki

  1. Alright fixed the issue. Looked into the sql resource, turns out it is altering the table to be a smallint, unbeknownst to me. Changed it to an integer. Solved. But thank you anyway, Ares.
  2. Create the vehicle, then set its dimension right after you create it. And do what Gallardo said, and make your player is in the same dimension.
  3. Tried it, with no avail. Still produces the same error.
  4. Hello, So, I'm getting an error every time a player disconnects with a high wanted level (getElementData( plr, "wantedPoints" )). It says: (1246) Out of range value for column 'wanted' at row 1 I had a look on stackoverflow.com, and people there suggested to change the column data type to unassigned integer. Maybe a bigint would also work? But that makes no sense, because the wantedLevel element data, will return 4 digit numbers with 3 integers max (2035.432 for example). Here is the code below. There is more to it, but it has no effect on the issue at hand. db = exports.sql:getConnection() function savePlayerData ( thePlayer ) if ( exports.core:getPlayerAccountID( thePlayer ) ) then if ( isPedDead( thePlayer ) ) then armor = 0 else armor = getPedArmor( thePlayer ) end local x, y, z = getElementPosition ( thePlayer ) local playtime = getElementData( thePlayer, "playTime" ) local wantedPoints = getElementData( thePlayer, "wantedPoints" ) local money = getPlayerMoney( thePlayer ) local interior = getElementInterior( thePlayer ) local dimension = getElementDimension( thePlayer ) local rot = getPedRotation( thePlayer ) local occupation = exports.core:getPlayerOccupation( thePlayer ) local team = getTeamName( getPlayerTeam( thePlayer ) ) local id = exports.core:getPlayerAccountID( thePlayer ) if ( playtime ) then dbExec( db, "UPDATE `accounts` SET `money`=?, `health`=?, `armor`=?, `wanted`=?, `x`=?, `y`=?, `z`=?, `interior`=?, `dimension`=?, `rotation`=?, `occupation`=?, `team`=?, `playtime`=? WHERE `id`=?", money, getElementHealth( thePlayer ), armor, wantedPoints, x, y, z, interior, dimension, rot, occupation, team, playtime, id ) else -- don't set playtime to avoid the risk of losing it all dbExec( db, "UPDATE `accounts` SET `money`=?, `health`=?, `armor`=?, `wanted`=?, `x`=?, `y`=?, `z`=?, `interior`=?, `dimension`=?, `rotation`=?, `occupation`=?, `team`=? WHERE `id`=?", money, getElementHealth( thePlayer ), armor, wantedPoints, x, y, z, interior, dimension, rot, occupation, team, id ) end return true else return false end end
  5. When you go into the memberlist, and sort members by the first character of their name, you receive a 404 error. Example: memberlist.php&first_char=k#memberlist Screenshot: http://puu.sh/fxTFL/3e3d1a0bde.png
  6. Pseudo code: Query from the database Poll the query If query poll returned a table Do what you want
  7. There is also a your private IP address (it looks like this), which can change. I believe that's the IP you share with your router. Correct me if I'm wrong. I suggest you check for that in your router settings.
  8. Nice job! Keep up the amazing work guys.
  9. Hello, I was wondering if it is possible to group players via certain element data on the scoreboard. If so, I would like a script example and/or functions needed. Thank you.
  10. Noki

    Playerblip F11

    Why use getDistanceBetweenPoints2D? Just set the max blip distance to what you want in createBlipAttachedTo. That saves having to check if players are within a certain range of the source every second or so.
  11. Noki

    Playerblip F11

    Try this -- Server side local blip = {} function applyBlips() for k, player in pairs( getElementsByType( "player" ) ) do local r, g, b = getPlayerNametagColor( player ) if isPedDead( player ) then return end if not blip[ player ] then blip[ player ] = createBlipAttachedTo( player, 0, 2, r, g, b, 255 ) else setBlipColor( blip[ player ], r, g, b, 255 ) end end end addEventHandler( "onResourceStart", resourceRoot, applyBlips ) setTimer( applyBlips, 500, 0 ) -- This is to account for team changes. function createBlips() if ( source ) then player = source end local r, g, b = getPlayerNametagColor( player ) if not blip[ player ] then blip[ player ] = createBlipAttachedTo( player, 0, 2, r, g, b, 255 ) else setBlipColor( blip[ player ], r, g, b, 255 ) end end addEventHandler( "onPlayerSpawn", root, createBlips ) function destroyBlip() if ( source ) then player = source end if ( blip[ player ] and isElement( blip[ player ] ) ) then destroyElement( blip[ player ] ) blip[ player ] = nil end end addEventHandler( "onPlayerQuit", root, destroyBlip ) function timedDestory() setTimer( destroyBlip, 4000, 1, source ) end addEventHandler( "onPlayerWasted", root, timedDestory )
  12. We are still having power to run more than 100 server in our system Sorry, but that isn't completely reliable. Servers can contain a varied amount of scripts, and those resources use different amounts of server resources (CPU, memory, bandwidth etc). 100 servers is not an accurate figure.
  13. Holy shit, this looks just the like actual move. Nice job mate.
  14. The group system is designed to work with an SQL database system of some sort. That's probably why a lot of features aren't working for you.
  15. Have you configured it to work with a SQL database of some sort? Also, what does your debugscript say when you attempt to chat, or withdraw money?
  16. I would like to know what hardware your servers use. I feel as though I would not be fully informed on what I was paying for.
  17. Is this the whole script? Because I think there is more. Post the rest and we'll be able to help you.
  18. I have to ask, what method are you following to texture your models?
  19. Noki

    WHAT THE...!?

    But is there a way to distinguish between a custom build server and a "normal" server?
  20. The sky is blue because that's how it is by default. You can however change it by using setSkyGradient. Run them and check. Open the files and look for command handlers and event handlers to trigger them. Explore!
  21. Noki

    CPU usage

    No, i'm not using them. Speaking of custom blips, you can simply create them clientside to save server resources. I looked at webadmin and it was using upwards of 20% CPU on each client (client CPU).
  22. Noki

    CPU usage

    Is it for that customblips?
  23. Noki

    Relative dx method

    But your thing just calls a function several times a second. It doesn't eliminate the constant mathematical calculation that occurs.
  24. Are you going to customize default CJ clothing (if you choose to do CJ), of use shaders for clothing?
  25. Noki

    Relative dx method

    Thanks, Castillo. It works great.
×
×
  • Create New...