Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Anonymous

#1
Several players are experiencing this issue, we will be looking into it sometime soon.
#2
Hi there, thanks for reporting the issue.

This appears to me to be an issue with GTA:Connected, and will hopefully be fixed soon.



Edit:  (On 15th May 2023)
If I remember correctly, the issue with GTAC regarding the resource stopping has now been resolved (a long time ago now).
If you are experiencing this issue in general, be sure to re-download and use the latest GTAC server from gtaconnected.com. (Prefer 64 bit over 32 bit)
#3
You cannot view this attachment.

Commands:



GENERIC



/pos [player]

/rot [player]

/vehicleinfo [player]

/playermodel [player] [model]

/goto player

/get player

/interior [player] [interior]

/gravity [player] [level]

/id [player]

/health [player] [amount]

/armour [player] [amount]

/spawnhealth [amount]

/spawnarmour [amount]

/bleeding [player] [bool]

/falloffbike [player] [bool]

/crouch [player] [bool]

/mass [player] [player]

/vehiclehealth [player] [health]

/snow [bool]

/speed [player] [speed]

/commands

/whospawned

/whoinvehicle

/occupants [player]

/bulletproof [player] [bool]

/fireproof [player] [bool]

/explosionproof [player] [bool]

/collisionproof [player] [bool]

/meleeproof [player] [bool]

/vehiclemodel [player] [model]

/opengarage garage

/closegarage garage

/isgarageclosed garage

/time [time]

/hour [hour]

/minute [minute]

/second [second]

/kill

/killplayer [player]

/alladmin [level]

/bounds [bool]

/ping [target]

/game [target]

/gameversion [target]

/pointgunat [target]

/bigmessage player int int text

/pagermessage player int int int text

/smallmessage player int int text

/clearmessages [player]

/weather [weather]

/fix

/flip

/gotoposition x y z

/heading [target]

/velocity

/turnvelocity

/ground [target]

/damage [bool]

/eject [player]

/pingabove ping

/announce text

/calltaxi

/centerofmass [target]

/maxstamina [target] [stamina]

/maxhealth [target]

/entervehicle vehicleID [seat]

/exitvehicle

/weaponstate [target]

/warp [target] [vehicleID] [seat]

/walkstyle [walkStyleID]

/xoffset offset

/yoffset offset

/zoffset offset



WEAPONS



/weapon [player] [weapon] [ammunition]

/clearweapons [player]

/weapons [player]

/weaponall [weapon] [ammunition]



ELEMENTS



/maxplayers

/maxobjects

/maxvehicles

/maxpickups

/maxspheres

/maxpeds

/maxblips



/object [model] [type]

/vehicle [model]

/pickup [model] [type]

/sphere [size]

/ped [model]

/blip [model]



/players

/objects

/vehicles

/pickups

/spheres

/peds

/blips

/elements



/nearplayers

/nearobjects [radius]

/nearvehicles [radius]

/nearpickups [radius]

/nearspheres [radius]

/nearblips [radius]

/nearpeds [radius]



/removeobject objectID

/removevehicle vehicleID

/removepickup pickupID

/removesphere sphereID

/removeblip blipID

/removeped pedID



/isobjectonscreen objectID

/isvehicleonscreen vehicleID

/ispickuponscreen pickupID

/issphereonscreen sphereID

/ispedonscreen pedID

/isbliponscreen blipID



/objectids

/vehicleids

/pickupids

/sphereids

/pedids

/blipids



/clientids

/playerids

/playervehicleids



/objectdistance elementId

/vehicledistance elementId

/pickupdistance elementId

/spheredistance elementId

/peddistance elementId

/blipdistance elementId

/playerdistance [target]



/saveobject objectID

/savevehicle [vehicleID]

/savepickup pickupID

/savesphere sphereID

/saveped pedID

/saveblip blipID



/objectsyncers

/vehiclesyncers

/pickupsyncers

/spheresyncers

/pedsyncers

/blipsyncers



/objectdimensions

/vehicledimensions

/pickupdimensions

/spheredimensions

/peddimensions

/blipdimensions

/playerdimensions



/objectsyncer elenentID

/vehiclesyncer elenentID

/pickupsyncer elenentID

/spheresyncer elenentID

/pedsyncer elenentID

/blipsyncer elenentID



/gotoobject objectID

/gotovehicle vehicleID

/gotopickup pickupID

/gotosphere sphereID

/gotoped pedID

/gotoblip blipID



ADMIN



/level [player]

/admin



/commandlevel [command] [level]

/commandlevels



/disablecommand command

/enablecommand command

/disabledcommands



COMMAND ALIAS



/commandalias [command] [alias]

/removecommandalias [command]

/commandaliases



TELEPORT



/addteleport name

/removetelerport name

/teleports

/gototeleport name



KEYS



/key key [command] [...args]

/unkey key

/keys



ACCOUNT



/register password

/login password

/logout

/accounts



SPAWN



/spawns

/spawnids

/addspawn

/removespawn [spawnID]

/gotospawn spawnID

/savespawn spawnID



RESOURCE



/resources

/resourcenames

/startresource resource

/stopresource resource



MISSION



/mission missionId [player] [player] [player] [...]

/cancelmission

/onmission [target]



#4
Scripting Releases / [JS] MexUI
July 07, 2019, 03:01:25 AM
MexUI
A styleable UI system for input controls and windows

Download
You cannot view this attachment.

Window
mexui.window(x, y, w, h, title, styles);
Controls
All of these return an object of the specified control type.
window.button(x, y, w, h, text, styles, callback);
window.character(x, y, w, h, text, styles, callback);
window.characters(x, y, w, h, text, styles, callback);
window.checkBox(x, y, w, h, text, styles, callback);
window.day(x, y, w, h, text, styles, callback);
window.date(x, y, w, h, text, styles, callback);
window.digit(x, y, w, h, text, styles, callback);
window.digits(x, y, w, h, text, styles, callback);
window.dropDown(x, y, w, h, text, styles, callback);
window.grid(x, y, w, h, styles);
window.hour(x, y, w, h, text, styles, callback);
window.image(x, y, w, h, filePath, styles);
window.integer(x, y, w, h, text, styles, callback);
window.letter(x, y, w, h, text, styles, callback);
window.letters(x, y, w, h, text, styles, callback);
window.letterDigit(x, y, w, h, text, styles, callback);
window.lettersDigits(x, y, w, h, text, styles, callback);
window.line(x, y, w, h, styles, callback);
window.list(x, y, w, h, styles, callback);
window.minute(x, y, w, h, text, styles, callback);
window.month(x, y, w, h, text, styles, callback);
window.number(x, y, w, h, text, styles, callback);
window.password(x, y, w, h, text, styles, callback);
window.progressBar(x, y, w, h, text, styles);
window.radioButton(x, y, w, h, text, groupId, styles, callback);
window.rangedInteger(x, y, w, h, text, min, max, styles, callback);
window.rangedNumber(x, y, w, h, text, min, max, styles, callback);
window.rectangle(x, y, w, h, styles, callback);
window.scrollBar(x, y, w, h, isVertical, styles, callback);
window.second(x, y, w, h, text, styles, callback);
window.slider(x, y, w, h, isVertical, text, minText, maxText, styles, callback);
window.tabPanel(x, y, w, h, styles, callback);
window.text(x, y, w, h, text, styles);
window.textArea(x, y, w, h, text, styles, callback);
window.textInput(x, y, w, h, text, styles, callback);
window.time(x, y, w, h, text, styles, callback);
window.tree(x, y, w, h, styles, callback);
window.week(x, y, w, h, text, styles, callback);
window.year(x, y, w, h, text, styles, callback);

Controls Methods/Properties
The term "element" here pertains to the object returned by all control types as listed above.
element.bindTo(element);
Styles
Styles are used as objects, and apply designs to GUI components
Use sub objects (somewhat similar to CSS pseudo classes) for style transitions on specific actions, like hover
{
    main: {
        backgroundColour: toColour(0, 0, 0, 255),
        textColour: toColour(255, 255, 255, 255),
        hover: {
            backgroundColour: toColour(255, 255, 255, 255),
            textColour: toColour(0, 0, 0, 255),
            transitionTime: 500,
            transitionDelay: 0,
        }
    }
}
#5
We have them server-side, they are needed client-side.



onPedEnterVehicle(event, ped, vehicle, seat)

onPedExitVehicle(event, ped, vehicle)
#6
I've just noticed that this code depends on a string explode() function, I've added that to the first post in this thread.
#7
General Chat / Re: Questions
July 16, 2018, 11:59:13 PM
Eventually will probably come a point in the mod where if something is needed, it will be added.
#8
the nodes folder goes in same folder as server.lua

it just loads the path data

it doesnt put peds on paths
#9
Be sure to have "nodes/paths.ipl" file existing, copied from game folder.


traffic = {}
traffic.sidewalk = {}
traffic.sidewalk.nodes = {}
traffic.sidewalk.nodeGroups = {}
traffic.road = {}
traffic.road.nodes = {}
traffic.road.nodeGroups = {}
traffic.water = {}
traffic.water.nodes = {}
traffic.water.nodeGroups = {}

addEventHandler('OnResourceStart', function(event, resource)
if resource ~= thisResource then return end

-- load ped nodes into server memory
print('Loading traffic data..')

local file = openFile('nodes/paths.ipl')
local data = file:readBytes(1171556)
file:close()
local lines = explode("rn", data)

local groupType, node
local groupNodes_sidewalk, groupNodes_road, groupNodes_water = {}, {}, {}
for i,v in ipairs(lines) do
if v:find(',', 0, true) then

if v:len() <= 8 then
-- group type
if #groupNodes_sidewalk > 0 then table.insert(traffic.sidewalk.nodes, groupNodes_sidewalk) end
if #groupNodes_road > 0 then table.insert(traffic.road.nodes, groupNodes_road) end
if #groupNodes_water > 0 then table.insert(traffic.water.nodes, groupNodes_water) end
groupNodes_sidewalk = {}
groupNodes_road = {}
groupNodes_water = {}

groupType = tonumber(v:sub(1, 1))
else
-- node type
node = explode(',', v)
for i2,v2 in ipairs(node) do
node[i2] = tonumber(v2)
end

node[4] = node[4] / 16.0
node[5] = node[5] / 16.0
node[6] = node[6] / 16.0

if groupType == 0 then -- sidewalk
table.insert(groupNodes_sidewalk, node)
traffic.sidewalk.nodeGroups[node] = groupNodes_sidewalk
elseif groupType == 1 then -- road
table.insert(groupNodes_road, node)
traffic.road.nodeGroups[node] = groupNodes_road
elseif groupType == 2 then -- water
table.insert(groupNodes_water, node)
traffic.water.nodeGroups[node] = groupNodes_water
end
end

end
end
if #groupNodes_sidewalk > 0 then table.insert(traffic.sidewalk.nodes, groupNodes_sidewalk) end
if #groupNodes_road > 0 then table.insert(traffic.road.nodes, groupNodes_road) end
if #groupNodes_water > 0 then table.insert(traffic.water.nodes, groupNodes_water) end

print('Done.')
end)

function explode(div,str) -- credit: http://richard.warburton.it
  -- http://lua-users.org/wiki/MakingLuaLikePhp
  if (div=='') then return false end
  local pos,arr = 0,{}
  -- for each divider found
  for st,sp in function() return string.find(str,div,pos,true) end do
    table.insert(arr,string.sub(str,pos,st-1)) -- Attach chars left of current divider
    pos = sp + 1 -- Jump past current divider
  end
  table.insert(arr,string.sub(str,pos)) -- Attach chars right of last divider
  return arr
end
#10
Scripting Releases / [JS] Intervaled messages
May 12, 2018, 07:06:58 AM
var intervaledMessages = {};

intervaledMessages.enabled = true;
intervaledMessages.messages = [];
intervaledMessages.messageIndex = 0;
intervaledMessages.messageInterval = 60000;

intervaledMessages.messages[0] = 'Message 1';
intervaledMessages.messages[1] = 'Message 2';
intervaledMessages.messages[2] = 'Message 3';

if(intervaledMessages.enabled && intervaledMessages.messages.length != 0)
{
setInterval(function(){
outputChatBox(intervaledMessages.messages[intervaledMessages.messageIndex], COLOUR_BLUE);

if(intervaledMessages.messageIndex == (intervaledMessages.messages.length - 1))
intervaledMessages.messageIndex = 0;
else
intervaledMessages.messageIndex++;
}, intervaledMessages.messageInterval);
}
#11
var admin = {};

admin.playerNamesData = {};
admin.connectedPlayersData = {};
admin.commandLevels = {};

// players
admin.playerNamesData['username1'] = {};
admin.playerNamesData['username1'].level = 10;
admin.playerNamesData['username1'].password = 'abc';

admin.playerNamesData['secondUsername'] = {};
admin.playerNamesData['secondUsername'].level = 10;
admin.playerNamesData['secondUsername'].password = 'abc';

// commands
admin.commandLevels['commanda'] = 5;
admin.commandLevels['commandb'] = 10;
admin.commandLevels['commandc'] = 11;

// code
function checkPlayerCommandLevel(client, commandName)
{
if(admin.commandLevels[commandName])
{
if(!admin.connectedPlayersData[client.player.name].loggedIn || admin.playerNamesData[client.player.name].level < admin.commandLevels[commandName])
{
outputChatBox("You do not have high enough admin level to use this command!", COLOUR_RED, client);
return false;
}
}
return true;
}

addEventHandler("OnPlayerJoined", (event,client) => {
admin.connectedPlayersData[client.player.name] = {};
});

addEventHandler("OnPlayerQuit", (event,client,reason) => {
admin.connectedPlayersData[client.player.name] = null;
});

addCommandHandler("login", (commandName, args, client) => {
if(admin.playerNamesData[client.player.name])
{
if(args == admin.playerNamesData[client.player.name].password)
{
admin.connectedPlayersData[client.player.name].loggedIn = true;
outputChatBox("You have logged in!", COLOUR_BLUE, client);
}
else
{
outputChatBox("Incorrect password!", COLOUR_RED, client);
}
}
else
{
outputChatBox("Account does not exist!", COLOUR_RED, client);
}
});

addCommandHandler("commanda", (commandName, args, client) => {
if(!checkPlayerCommandLevel(client, commandName))
{
return;
}

outputChatBox("Command a", COLOUR_BLUE, client);
});

addCommandHandler("commandb", (commandName, args, client) => {
if(!checkPlayerCommandLevel(client, commandName))
{
return;
}

outputChatBox("Command b", COLOUR_BLUE, client);
});

addCommandHandler("commandc", (commandName, args, client) => {
if(!checkPlayerCommandLevel(client, commandName))
{
return;
}

outputChatBox("Command c", COLOUR_BLUE, client);
});
#12
Scripting Releases / [Lua] Run Code Ingame
April 07, 2018, 07:07:54 PM
Commands:

/s <code> (for server-side Lua expressions)

/c <code> (for client-side Lua expressions)

/s2 <code> (for server-side Lua statements)

/c2 <code> (for client-side Lua statements)



Server-side Code:


addCommandHandler("s",function(commandName,code,client) -- expressions
if code == '' then
outputChatBox(client.player.name..", you must type some server code to run! Syntax /s <code>", CHAT_TYPE_INFO)
else
local returns = { pcall(load("return "..code)) }
local status = table.remove(returns, 1)
if not status then
local _error = returns[1]
outputChatBox(client.player.name.."'s server code had an error!", CHAT_TYPE_INFO)
outputChatBox("Code: "..code, CHAT_TYPE_INFO)
outputChatBox("Error: ".._error, CHAT_TYPE_INFO)
else
outputChatBox(client.player.name.." ran server code: "..code, CHAT_TYPE_INFO)
local argsStr = getArgsString(table.unpack(returns))
outputChatBox("Returns: "..argsStr, CHAT_TYPE_INFO)
end
end
end)
addCommandHandler("s2",function(commandName,code,client) -- statements
if code == '' then
outputChatBox(client.player.name..", you must type some server code to run! Syntax /s2 <code>", CHAT_TYPE_INFO)
else
local status, _error = pcall(load(code))
if not status then
outputChatBox(client.player.name.."'s server code had an error!", CHAT_TYPE_INFO)
outputChatBox("Code: "..code, CHAT_TYPE_INFO)
outputChatBox("Error: ".._error, CHAT_TYPE_INFO)
else
outputChatBox(client.player.name.." ran server code: "..code, CHAT_TYPE_INFO)
end
end
end)

function ocb(...)
outputChatBox(getArgsString(...), CHAT_TYPE_INFO)
end

function getArgsString(...)
local arg = {...}
    local Values, Value, Type = {}
    for i,v in ipairs(arg) do
        Type = type(v)
        if     Type == "number"   then Value = v
        elseif Type == "boolean"  then Value = (v) and "true" or "false"
        elseif Type == "string"   then Value = [[']]..replace(replace(v, [[]], [[\]]), [[']], [[']])..[[']]
        elseif Type == "table"    then Value = getTableString(v)
        elseif Type == "function" then Value = "function"
        elseif Type == "userdata" then Value = "userdata: "..tostring(v)
        elseif Type == "nil"      then Value = "nil"
        else                           Value = (Type) and ""..Type.."" or "unknown data type"
        end
        table.insert(Values, Value)
    end
    return (Values[1]) and table.concat(Values, ", ") or "nil"
end

function replace(String, LookFor, ReplaceWith)
    if not String or not LookFor or not ReplaceWith then return end
    String, LookFor, ReplaceWith = tostring(String), tostring(LookFor), tostring(ReplaceWith)
   
    local NewString = ""
    local OccuranceStartPos = string.find(String, LookFor, 1, true)
    if not OccuranceStartPos then return String end
   
    if OccuranceStartPos > 1 then
        NewString = NewString..string.sub(String, 1, OccuranceStartPos - 1)
    end
   
    local OccuranceEndPos
    while OccuranceStartPos do
        OccuranceEndPos = OccuranceStartPos + (string.len(LookFor) - 1)
        NewString = NewString..ReplaceWith
        OccuranceStartPos = string.find(String, LookFor, OccuranceEndPos + 1, true)
        if (OccuranceStartPos or 0) - 1 > OccuranceEndPos then
            NewString = NewString..string.sub(String, OccuranceEndPos + 1, OccuranceStartPos - 1)
        end
    end
   
    if OccuranceEndPos < string.len(String) then
        NewString = NewString..string.sub(String, OccuranceEndPos + 1)
    end
   
    return NewString
end

function getTableString(Table)
    local String, IntKey, Element = {}, (isTableIntKey(Table)) and true or false
    table.insert(String, '{')
    for i,v in _G[((IntKey) and 'i' or '')..'pairs'](Table) do
        Element = { i, v }
        for j,w in ipairs(Element) do
            if j == 1 then table.insert(String, ((#String > 1) and ',' or '')..((IntKey) and '' or '[')) end
           
            if not IntKey or j == 2 then
                Type = type(w)
                if Type == 'number' then table.insert(String, w)
                elseif Type == 'boolean' then table.insert(String, ((w) and 'true' or 'false'))
                elseif Type == 'string' then table.insert(String, [[']]..replace(replace(w, [[]], [[\]]), [[']], [[']])..[[']])
                elseif Type == 'table' then table.insert(String, getTableString(w))
                elseif Type == 'function' then table.insert(String, 'function')
                elseif Type == 'userdata' then table.insert(String, 'userdata: '..tostring(w))
                elseif Type == 'nil' then table.insert(String, 'nil')
                else table.insert(String, 'unknown data type')
                end
            end
           
            if j == 1 then table.insert(String, ((IntKey) and '' or ']=')) end
        end
    end
    table.insert(String, '}')
    return table.concat(String)
end

function isTableIntKey(Table)
    local b = 0
    for i,v in pairs(Table) do b = b + 1 end
    for a=1, b do
        if Table[a] == nil then return false end
    end
    return true
end

Client-side code:


addCommandHandler("c",function(commandName,code) -- expressions
if code == '' then
outputChatBox(localPlayer.name..", you must type some client code to run! Syntax /c <code>", CHAT_TYPE_INFO)
else
local returns = { pcall(load("return "..code)) }
local status = table.remove(returns, 1)
if not status then
local _error = returns[1]
outputChatBox(localPlayer.name.."'s client code had an error!", CHAT_TYPE_INFO)
outputChatBox("Code: "..code, CHAT_TYPE_INFO)
outputChatBox("Error: ".._error, CHAT_TYPE_INFO)
else
outputChatBox(localPlayer.name.." ran client code: "..code, CHAT_TYPE_INFO)
local argsStr = getArgsString(table.unpack(returns))
outputChatBox("Returns: "..argsStr, CHAT_TYPE_INFO)
end
end
end)
addCommandHandler("c2",function(commandName,code) -- statements
if code == '' then
outputChatBox(localPlayer.name..", you must type some client code to run! Syntax /c2 <code>", CHAT_TYPE_INFO)
else
local status, _error = pcall(load(code))
if not status then
outputChatBox(localPlayer.name.."'s client code had an error!", CHAT_TYPE_INFO)
outputChatBox("Code: "..code, CHAT_TYPE_INFO)
outputChatBox("Error: ".._error, CHAT_TYPE_INFO)
else
outputChatBox(localPlayer.name.." ran client code: "..code, CHAT_TYPE_INFO)
end
end
end)

function ocb(...)
outputChatBox(getArgsString(...), CHAT_TYPE_INFO)
end

function getArgsString(...)
local arg = {...}
    local Values, Value, Type = {}
    for i,v in ipairs(arg) do
        Type = type(v)
        if     Type == "number"   then Value = v
        elseif Type == "boolean"  then Value = (v) and "true" or "false"
        elseif Type == "string"   then Value = [[']]..replace(replace(v, [[]], [[\]]), [[']], [[']])..[[']]
        elseif Type == "table"    then Value = getTableString(v)
        elseif Type == "function" then Value = "function"
        elseif Type == "userdata" then Value = "userdata: "..tostring(v)
        elseif Type == "nil"      then Value = "nil"
        else                           Value = (Type) and ""..Type.."" or "unknown data type"
        end
        table.insert(Values, Value)
    end
    return (Values[1]) and table.concat(Values, ", ") or "nil"
end

function replace(String, LookFor, ReplaceWith)
    if not String or not LookFor or not ReplaceWith then return end
    String, LookFor, ReplaceWith = tostring(String), tostring(LookFor), tostring(ReplaceWith)
   
    local NewString = ""
    local OccuranceStartPos = string.find(String, LookFor, 1, true)
    if not OccuranceStartPos then return String end
   
    if OccuranceStartPos > 1 then
        NewString = NewString..string.sub(String, 1, OccuranceStartPos - 1)
    end
   
    local OccuranceEndPos
    while OccuranceStartPos do
        OccuranceEndPos = OccuranceStartPos + (string.len(LookFor) - 1)
        NewString = NewString..ReplaceWith
        OccuranceStartPos = string.find(String, LookFor, OccuranceEndPos + 1, true)
        if (OccuranceStartPos or 0) - 1 > OccuranceEndPos then
            NewString = NewString..string.sub(String, OccuranceEndPos + 1, OccuranceStartPos - 1)
        end
    end
   
    if OccuranceEndPos < string.len(String) then
        NewString = NewString..string.sub(String, OccuranceEndPos + 1)
    end
   
    return NewString
end

function getTableString(Table)
    local String, IntKey, Element = {}, (isTableIntKey(Table)) and true or false
    table.insert(String, '{')
    for i,v in _G[((IntKey) and 'i' or '')..'pairs'](Table) do
        Element = { i, v }
        for j,w in ipairs(Element) do
            if j == 1 then table.insert(String, ((#String > 1) and ',' or '')..((IntKey) and '' or '[')) end
           
            if not IntKey or j == 2 then
                Type = type(w)
                if Type == 'number' then table.insert(String, w)
                elseif Type == 'boolean' then table.insert(String, ((w) and 'true' or 'false'))
                elseif Type == 'string' then table.insert(String, [[']]..replace(replace(w, [[]], [[\]]), [[']], [[']])..[[']])
                elseif Type == 'table' then table.insert(String, getTableString(w))
                elseif Type == 'function' then table.insert(String, 'function')
                elseif Type == 'userdata' then table.insert(String, 'userdata: '..tostring(w))
                elseif Type == 'nil' then table.insert(String, 'nil')
                else table.insert(String, 'unknown data type')
                end
            end
           
            if j == 1 then table.insert(String, ((IntKey) and '' or ']=')) end
        end
    end
    table.insert(String, '}')
    return table.concat(String)
end

function isTableIntKey(Table)
    local b = 0
    for i,v in pairs(Table) do b = b + 1 end
    for a=1, b do
        if Table[a] == nil then return false end
    end
    return true
end