Jump to content

[Pregunta] color de auto teams


santiagoBMX

Recommended Posts

lo que pasa es que en el auto teams que tengo nose como poner el segundo color

porque el infernus que tengo es de dos colores

esta es la parte donde se ponen los colores

  
local names ={"Guest Team","BMXowner"} 
local tags  ={"","[XR]"} 
local colors ={"#e6e6e6","#ff0000"} 
local acls ={"none","Admin"} 

y el carro se ve asi

thump_8585177mtascreen20130815191.png

lo que quiero hacer es cambiarle el color a las lineas negras :D pero no se como .-.

me podrian decir como editar eso?

gracias

Link to comment

puedes usar esta funcion

function teamguest () 
    guest = createTeam ( "Guest Team", 192,192,192)-- nombre de team y color 
    setVehicleColor ( guest , 0, 0, 0, 0 , 36, 0 )  -- color de auto 
end 
addEventHandler("onResourceStart", resourceRoot, teamguest)  
  
  
function guest() 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Evoryone")) then -- ACL 
   setPlayerTeam(source, guest)  
   end 
end 
addEventHandler("onPlayerLogin",getRootElement(),guest)  

Link to comment
puedes usar esta funcion
function teamguest () 
    guest = createTeam ( "Guest Team", 192,192,192)-- nombre de team y color 
    setVehicleColor ( guest , 0, 0, 0, 0 , 36, 0 )  -- color de auto 
end 
addEventHandler("onResourceStart", resourceRoot, teamguest)  
  
  
function guest() 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Evoryone")) then -- ACL 
   setPlayerTeam(source, guest)  
   end 
end 
addEventHandler("onPlayerLogin",getRootElement(),guest)  

el primer argumento de vehiclecolor es el vehiculo, y guest es un team?

eso no funcionara en lo absoluto

Link to comment
puedes usar esta funcion
function teamguest () 
    guest = createTeam ( "Guest Team", 192,192,192)-- nombre de team y color 
    setVehicleColor ( guest , 0, 0, 0, 0 , 36, 0 )  -- color de auto 
end 
addEventHandler("onResourceStart", resourceRoot, teamguest)  
  
  
function guest() 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Evoryone")) then -- ACL 
   setPlayerTeam(source, guest)  
   end 
end 
addEventHandler("onPlayerLogin",getRootElement(),guest)  

el primer argumento de vehiclecolor es el vehiculo, y guest es un team?

eso no funcionara en lo absoluto

de echo si funciona se crea el team pero no se pinta el auto :cry::cry:

Link to comment

si yo creo que eso sirve, pero a lo que me refiero es que si se le puede poner el color 2 al script que yo tengo

que es todo este

---------------do not change or touch this---------- 
Names={} 
Tags={} 
Colors={} 
ACL={} 
-------------------------------------------------------------- 
  
---------------------------here put your clans read readme for instructions--------------------------------------- 
  
local names ={"Guest Team","BMXowner"} 
local tags  ={"","[XR]"} 
local colors ={"#e6e6e6","#ff0000"} 
local acls ={"none","Admin"} 
-------- load------------ 
  
function loadTeams() 
 for i,name in pairs(names) do 
Names[i]=name 
end 
  
for i,tag in pairs(tags) do 
Tags[i]=tag 
end 
  
for i,color in pairs(colors) do 
Colors[i] = color 
end 
  
  
for i,acl in pairs(acls) do 
ACL[i] = acl 
end 
 end 
  
  
addEventHandler("onResourceStart",getRootElement(),loadTeams) 
  
--------------------------------------------------- 
  
----- move on start------------------ 
  
function moveOnStart() 
for i,player in pairs(getElementsByType("player")) do 
check(player) 
end 
end 
  
addEventHandler("onResourceStart",getRootElement(),moveOnStart) 
------------------------------------------------------------------------- 
  
-----------check---------------------------- 
  
function check (player) 
setPlayerTeam(player,nil) 
 for i,tag in pairs(tags) do 
    if string.find(getPlayerName(player),tag) then 
local account=getPlayerAccount(player) 
   if ACL[i]~="none" and not  isObjectInACLGroup ( "user." ..getAccountName(account) , aclGetGroup ( ACL[i] ) ) then 
return end 
local name = Names[i] 
local color = Colors[i] 
  if  not getTeamFromName(name) then 
createTeam(name,getColorFromString(color)) 
end 
local team = getTeamFromName(name) 
setPlayerTeam(player,team) 
  
end 
   end 
      end 
  
  
-------------------------------- 
  
  
----------remove Empty Team ---------- 
  
function remove() 
 for t,teams in pairs(names) do 
 local team = getTeamFromName(teams) 
  if team then 
     if  countPlayersInTeam ( team )==0 then 
         destroyElement(team) 
end 
   end 
       end 
          end 
  
----------------------------------------------------- 
  
-------NickChange------------- 
  
function nick(old,new) 
setTimer(check,1000,1,source) 
setTimer(remove,1500,1) 
end 
  
addEventHandler("onPlayerChangeNick",getRootElement(),nick) 
--------------------------------------------- 
  
-------Join-------------------------------- 
  
function join() 
setTimer(check,4000,1,source) 
end 
  
addEventHandler("onPlayerJoin",getRootElement(),join) 
------------------------------- 
  
---------Quit--------------------- 
  
function quit(player) 
setTimer(remove,1000,1) 
end 
  
addEventHandler("onPlayerQuit",getRootElement(),quit) 
------------------------------------ 
  
---------Login--------------------- 
  
function login() 
setTimer(check,1000,1,source) 
setTimer(remove,1500,1) 
end 
  
addEventHandler("onPlayerLogin",getRootElement(),login) 
------------------------------------ 
  
---------Logout--------------------- 
  
function logout() 
setTimer(check,1000,1,source) 
setTimer(remove,1500,1) 
end 
  
addEventHandler("onPlayerLogout",getRootElement(),logout) 
------------------------------------ 
  
  
----------blip-------------- 
  
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) 
             setVehicleColor ( blip,r,g,b) 
         end 
              end 
                     end  
 end 
    
  
function timer() 
setTimer(blip,3000,1,source) 
end 
  
addEventHandler("onPlayerSpawn",getRootElement(),timer) 
  
addEvent ( 'onPlayerPickUpRacePickup', true ) 
    function zaa ( id, type, model ) 
        if ( getPlayerTeam ( source ) ) then 
            if ( eventName == 'onPlayerPickUpRacePickup' and id == 'vehiclechange' or id == 'repair' or id == 'nitro' ) then 
                local r, g, b = getTeamColor ( getPlayerTeam ( source ) ) 
                local vehicle = getPedOccupiedVehicle(source) 
                setVehicleColor ( vehicle, r, g, b ); 
            else 
                local r, g, b = getTeamColor ( getPlayerTeam ( source ) ) 
                 local vehicle = getPedOccupiedVehicle(source) 
                setVehicleColor ( vehicle, r, g, b ) 
            end 
        end 
    end 
addEventHandler ( 'onPlayerVehicleEnter', root, zaa ) 
addEventHandler ( 'onPlayerPickUpRacePickup', root, zaa ) 
  

ah y me podrian decir que que editor de textos usan?

el mio no se pone de colores :c

jajajaja yo uso notepad++

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...