-
Posts
851 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Noki
-
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.
-
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.
-
Tried it, with no avail. Still produces the same error.
-
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
-
Pseudo code: Query from the database Poll the query If query poll returned a table Do what you want
-
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.
-
Nice job! Keep up the amazing work guys.
-
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.
-
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.
-
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 )
-
BlackBird Host|DDOS Protected MTA Server| Special MTA Offer|
Noki replied to BlackBirdHost's topic in Hosting solutions
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. -
Holy shit, this looks just the like actual move. Nice job mate.
-
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.
-
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?
-
BlackBird Host|DDOS Protected MTA Server| Special MTA Offer|
Noki replied to BlackBirdHost's topic in Hosting solutions
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. -
Is this the whole script? Because I think there is more. Post the rest and we'll be able to help you.
-
I have to ask, what method are you following to texture your models?
-
But is there a way to distinguish between a custom build server and a "normal" server?
-
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!
-
But your thing just calls a function several times a second. It doesn't eliminate the constant mathematical calculation that occurs.
-
Are you going to customize default CJ clothing (if you choose to do CJ), of use shaders for clothing?
-
Thanks, Castillo. It works great.