Ti ringrazio molto per il tuo aiuto, ho risolto il problema da solo, derivava dal fatto che il mio pannello utente, forniva un destructionderby ed altri file della race diversi, ho effettuato delle modifiche a questi file adattandoli al pannello e alla GM generale. PS: So gestire il server, non è il primo server che ho avuto, ho incontrato problemi perché era la priva volta che suavo questo pannello, e non ero a conoscenza che modificasse altri file nel race.zip, dato che non l'ho installato io.
Adesso avrei un'ultimissima domanda da porgerti.
Ho uno script autoteam, che setta il colore del veicolo del team appena spawnato, c'è però il problema che, quando si cambia veicolo ad un pickup, questo prende un colore random. La resource è installata correttamente ti posto il codice:
Tags = {
{"EG%//", "EG// European Gamers", "#08c3ff", nil },}ATCarcolor = true
ATNormalColor = {255, 255, 255}
function onResourceStartAutoteams()
for name, data in ipairs(Tags) do
--outputChatBox(" TEST: " .. name .. " " .. data[1] .. " " .. data[2] ) -- This is only for Test
for id, player in ipairs(getElementsByType("player")) do
if string.find(getPlayerName(player), data[1]) then
--outputChatBox( "Founded: " .. getPlayerName(players) .. " as " .. data[2]) -- This is only for Test
if not isElement(data[2]) or getElementType(data[2]) ~= "team" then
creatingTeam = createTeam( data[2], getColorFromString ( data[3] ) )
if creatingTeam then
outputDebugString( "Autoteams: Added team '" .. data[2] .. "'." )
data[4] = creatingTeam
end
end
setTimer(function()
for name, data in ipairs(Tags) do
for id, player in ipairs(getElementsByType("player")) do
if string.find(getPlayerName(player), data[1]) then
movedteam = setPlayerTeam ( player, data[4] )
if not movedteam then
MoveToTeam = getTeamFromName( data[2] )
outputDebugString( "Autoteams: Set '" .. getPlayerName(player) .. "' to team as '" .. data[2] .. "'." )
setPlayerTeam ( player, MoveToTeam )
return
end
outputDebugString( "Autoteams: Set '" .. getPlayerName(player) .. "' to team as '" .. data[2] .. "'." )
end
end
end
end, 2000, 1)
end
end
end
end
addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()), onResourceStartAutoteams )
function onPlayerChangeNickAutoteams()
setTimer(checkPlayerTeam, 2000, 1, source)
end
addEventHandler("onPlayerChangeNick", getRootElement(), onPlayerChangeNickAutoteams)
function onPlayerJoinAutoteams()
setTimer(checkPlayerTeam, 2000, 1, source)
end
addEventHandler( "onPlayerJoin", getRootElement(), onPlayerJoinAutoteams )
function onPlayerQuitAutoteams()
-- Remove teams if players are not team
returnPlayerTeam = getPlayerTeam( source )
if returnPlayerTeam then
setPlayerTeam( source, nil )
if countPlayersInTeam(returnPlayerTeam) == 0 then
destroyElement(returnPlayerTeam)
end
end
end
addEventHandler( "onPlayerQuit", getRootElement(), onPlayerQuitAutoteams )
function checkPlayerTeam(player)
local publicplayer = player
for name, data in ipairs(Tags) do
if string.find(getPlayerName(player), data[1]) then
if not isElement(data[4]) or getElementType(data[4]) ~= "team" then
creatingTeam = createTeam( data[2], getColorFromString ( data[3] ) )
if creatingTeam then
outputDebugString( "Autoteams: Added team '" .. data[2] .. "'." )
data[4] = creatingTeam
end
end
setTimer(function()
for name, data in ipairs(Tags) do
if string.find(getPlayerName(publicplayer), data[1]) then
movedteam = setPlayerTeam ( publicplayer, data[4] )
if not movedteam then
MoveToTeam = getTeamFromName( data[2] )
outputDebugString( "Autoteams: Set '" .. getPlayerName(publicplayer) .. "' to team as '" .. data[2] .. "'." )
setPlayerTeam ( publicplayer, MoveToTeam )
return
end
outputDebugString( "Autoteams: Set '" .. getPlayerName(publicplayer) .. "' to team as '" .. data[2] .. "'." )
end
end
end, 2000, 1)
else
-- Remove teams if players are not team
returnPlayerTeam = getPlayerTeam( player )
if returnPlayerTeam then
setPlayerTeam( player, nil )
if countPlayersInTeam(returnPlayerTeam) == 0 then
destroyElement(returnPlayerTeam)
end
end
end
end
end
function onChangeRaceState(newStateName)
for _,player in ipairs(getElementsByType("player")) do
if not getPlayerTeam(player) then
checkPlayerTeam(player)
end
if ATCarcolor == true then
local r,g,b = ATNormalColor[1], ATNormalColor[2], ATNormalColor[3]
local team = getPlayerTeam(player)
if team then
r,g,b = getTeamColor(team)
end
local PedIsInVehicle = getPedOccupiedVehicle(player)
if PedIsInVehicle then
setVehicleColor(PedIsInVehicle, r, g, b)
end
end
end
end
addEvent("onRaceStateChanging", true)
addEventHandler( "onRaceStateChanging", getRootElement(), onChangeRaceState)
----blips---
function blip(player)
local team = getPlayerTeam(player)
if team then
for v,blip in pairs(getAttachedElements(player)) do
if getElementType(blip)=="blip" then
local r,g,b =getTeamColor(team)
setBlipColor(blip,r,g,b,255)
end
end
end
end
function timer()
setTimer(blip,3000,1,source)
end
addEventHandler("onPlayerSpawn",getRootElement(),timer)
Ti ringrazio ancora per l'aiuto che mi hai fornito, sei molto disponibile