-
Posts
1,546 -
Joined
-
Last visited
Everything posted by Dimos7
-
In that code you try get a object from dimension or set it?
-
just remove from function the player or whatever and left it empty then in code down put source
-
firstly you not need put arugments for player in join because the souce of than even is player enter the server so change it other than that i don't see anything else
-
Try make it in resource restart when a player join and will be shovle your problem
-
onClientVehicleExit isVehicleNitroActivated setVehicleNitroActivated
-
You mean not active when leave a car?
-
How to disable minimap at starting when entering local server?
Dimos7 replied to bencskrisz's topic in Scripting
Its custom or orginal? -
Any errors or warnings in /debugscipt 3? clanRankNames = { [1] = "Aprediaz", [2] = "Membro", [3] = "Treinador", [4] = "Sub-Comandante", [5] = "Comandante", [6] = "Lider", } exports["scoreboard"]:scoreboardAddColumn("clanRank", root, 80,"clanRank", 5) function startHandler() for _, v in pairs(getElementsByType("player")) do for #clanRankNames do for i =1,6 do if not clanRankNames[i] then clanRankNames[i] = v setElementData(v, "clanRank", i) break end end end end end addEventHandler("onResourceStart", resourceRoot, startHandler) function loginHandler() for #clanRankNames do for i = 1, 6 do if not clanRankNames[i] then clanRankNames[i] = source setElementData(source, "clanRank", i) break end end end end addEventHandler("onPlayerLogin", root, loginHandler)
-
clanRankNames = { [1] = "Aprediaz", [2] = "Membro", [3] = "Treinador", [4] = "Sub-Comandante", [5] = "Comandante", [6] = "Lider", } exports["scoreboard"]:scoreboardAddColumn("Clan Rank", root, 80,"Clan Rank", 5) function startHandler() for _, v in pairs(getElementsByType("player")) do for i =1,6 do if not clanRankNames[i] then clanRankNames[i] = v setElementData(v, "Clan Rank", i) break end end end end addEventHandler("onResourceStart", resourceRoot, startHandler) function loginHandler() for i = 1, 6 do if not clanRankNames[i] then clanRankNames[i] = source setElementData(source, "Clan Rank", i) break end end end addEventHandler("onPlayerLogin", root, loginHandler)
-
That is for scoreboard?
-
Post your code here
-
function startHandler() for _, player in pairs (getElementsByType("player")) do local playerGang = getElementData(player, "gang") if playerGang then local r, g, b = unpack(getGangColor(playerGang)) setPlayerNametagColor(player, tonumber(r), tonumber(g), tonumber(b)) g_playerData[player] = {vehicles = {}, settings = {}} g_playerData[player].blip = createBlipAttachedTo(player, 0, 2, tonumber(r), tonumber(g), tonumber(b)) addEventHandler("onFreeroamLocalSettingsChange", player, onLocalSettingsChange) if getOption("welcometextonstart") then ouputChatBox("Welcome to Freeroam", player, 0, 255, 0) end end end end addEventHandler("onResourceStart", resourceRoot, startHandler) function joinHandler() local playerGang = getElementData(source, "gang") if playerGang then local r, g, b = unpack(getGangColor(playerGang)) setPlayerNametagColor(source, tonumber(r), tonumber(g), tonumber(b)) g_playerData[source] = {vehicles = {}, settings = {}} g_playerData[source].blip = createBlipAttachedTo(source, 0, 2, tonumber(r), tonumber(g), tonumber(b)) addEventHandler("onFreeroamLocalSettingsChange", source, onLocalSettingsChange) if getOption("welcometextonstart") then outputChatBox("Welcome to Freeroam", source, 0, 255, 0) end end end addEventHandler("onPlayerJoin", root, joinHandler) function getGangColor(gangName) return exports["gang-system"]:getGangData(gangName, "color") end Try this
-
The turf system has nothing to do with this just make sure that in gang system the getGangData is a table and not a boolen
-
function startHandler() for _, player in pairs (getElementsByType("player")) do local gangName = getElementData(player, "gang") local r, g, b = unpack(getGangColor(gangName)) setPlayerNametagColor(player, tonumber(r), tonumber(g), tonumber(b)) g_playerData[player] = {vehicles = {}, settings = {}} g_playerData[player].blip = createBlipAttachedTo(player, 0, 2, tonumber(r), tonumber(g), tonumber(b)) addEventHandler("onFreeroamLocalSettingsChange", player, onLocalSettingsChange) if getOption("welcometextonstart") then ouputChatBox("Welcome to Freeroam", player, 0, 255, 0) end end end addEventHandler("onResourceStart", resourceRoot, startHandler) function joinHandler() local gangName = getElementData(source, "gang") local r, g, b = unpack(getGangColor(gangName)) setPlayerNametagColor(source, tonumber(r), tonumber(g), tonumber(b)) g_playerData[source] = {vehicles = {}, settings = {}} g_playerData[source].blip = createBlipAttachedTo(source, 0, 2, tonumber(r), tonumber(g), tonumber(b)) addEventHandler("onFreeroamLocalSettingsChange", source, onLocalSettingsChange) if getOption("welcometextonstart") then outputChatBox("Welcome to Freeroam", source, 0, 255, 0) end end addEventHandler("onPlayerJoin", root, joinHandler) function getGangColor(gangName) return exports["gang-system"]:getGangData(gangName, "color") end
-
No i think is that not get the color of the gang function joinHandler() local gangName = getElementData(source , "gang") if gangName ~= nil then local r, g, b = export["gang-system"] :getGangData(gangName, "color") setPlayerNametagColor(source , tonumber(r), tonumber(g), tonumber(b)) g_PlayerData[source] = { vehicles = {}, settings={} } g_PlayerData[source].blip = createBlipAttachedTo(source , 0, 2, tonumber(r), tonumber(g), tonumber(b)) addEventHandler ("onFreeroamLocalSettingChange",source ,onLocalSettingChange) if getOption('welcometextonstart') then outputChatBox('Welcome to Freeroam', source , 0, 255, 0) end end addEventHandler('onPlayerJoin', root, joinHandler)
-
function joinHandler() local gangName = getElementData(source , "gang") if gangName ~= nil then local r, g, b = getGangColor(gangName) setPlayerNametagColor(source , tonumber(r), tonumber(g), tonumber(b)) g_PlayerData[source] = { vehicles = {}, settings={} } g_PlayerData[source].blip = createBlipAttachedTo(source , 0, 2, tonumber(r), tonumber(g), tonumber(b)) addEventHandler ("onFreeroamLocalSettingChange",source ,onLocalSettingChange) if getOption('welcometextonstart') then outputChatBox('Welcome to Freeroam', source , 0, 255, 0) end end addEventHandler('onPlayerJoin', root, joinHandler) function getGangColor(gangName) return exports[ "gang_system" ]:getGangData ( gangName, "color" ) end
-
function joinHandler() local gangName = getElementData(source , "gang") if gangName ~= nil then local r, g, b = getGangColor(gangName) setPlayerNametagColor(source , tonumber(r), tonumber(g), tonumber(b)) g_PlayerData[source] = { vehicles = {}, settings={} } g_PlayerData[source].blip = createBlipAttachedTo(source , 0, 2, tonumber(r), tonumber(g), tonumber(b)) addEventHandler("onFreeroamLocalSettingChange",player,onLocalSettingChange) if getOption('welcometextonstart') then outputChatBox('Welcome to Freeroam', source , 0, 255, 0) end end addEventHandler('onPlayerJoin', root, joinHandler) function getGangColor(gangName) return exports[ "gang_system" ]:getGangData ( gangName, "color" ) end
-
marker = createMarker(137.39999, 1850.4, 16.6, "cylinder", 1.5, 230, 251, 3, 153) function camera(player) if (getElementType(player) == "player") then fadeCamera(player, true, 0.5) setCameraMatrix(player, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) end end addEventHandler("onMarkerHit", marker, camera)
-
function getPlayerGang(thePlayer) local gangName = getElementData(thePlayer, "gang") if gangName ~= nil then local r, g, b = unpack(getGangColor(gangName)) setPlayerNametagColor(thePlayer, tonumber(r) , tonumber(g) , tonumber(b)) createBlipAttachedTo(thePlayer, 0, 2, tonumber(r), tonumber(g), tonumber(b)) end end function getGangColor(gangName) return export["gang-system"]:getGangData(gangName, "color“) end Mean you try to run a even on server that dosen't exist
-
function getPlayerGang(thePlayer) local gangName = getElementData(thePlayer, “gang“) if gangName ~= nil then local r, g, b = unpack(getGangColor(gangName)) setPlayerNametagColor(thePlayer, tonumber(r) , tonumber(g) , tonumber(b)) createBlipAttachedTo(thePlayer, 0, 2, tonumber(r), tonumber(g), tonumber(b)) end end function getGangColor(gangName) return export["gang-system"]:getGangData(gangName, "color“) end