santiagoBMX Posted August 19, 2013 Share Posted August 19, 2013 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 lo que quiero hacer es cambiarle el color a las lineas negras pero no se como .-. me podrian decir como editar eso? gracias Link to comment
MTA Team 0xCiBeR Posted August 20, 2013 MTA Team Share Posted August 20, 2013 Estas seguro de que tu skin permite 2 colores? Link to comment
santiagoBMX Posted August 20, 2013 Author Share Posted August 20, 2013 como asi? yo en el panel de admin le puedo poner 2 colores .-. no te entendi muy bien Link to comment
Daniel1zD Posted August 20, 2013 Share Posted August 20, 2013 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
BorderLine Posted August 20, 2013 Share Posted August 20, 2013 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
Daniel1zD Posted August 20, 2013 Share Posted August 20, 2013 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 Link to comment
santiagoBMX Posted August 20, 2013 Author Share Posted August 20, 2013 entonces? D: yo les entiendo de poco a nada nose nada de script, apenas lo de mi server y los scripts que me han ayudado a configurar. Entonces si hay forma de ponerle el segundo color con el script que tengo? gracias Link to comment
BorderLine Posted August 20, 2013 Share Posted August 20, 2013 getPlayerTeam getTeamColor setVehicleColor "onVehicleEnter" Link to comment
santiagoBMX Posted August 20, 2013 Author Share Posted August 20, 2013 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
BorderLine Posted August 20, 2013 Share Posted August 20, 2013 usa los tags [ lua ] [ /lua ] y con respecto a ponerle 2 colores. las lineas 169 y 173, hay defines el color del vehiculo, solo estan los primeros 3 colores, agregale 3 mas Link to comment
santiagoBMX Posted August 21, 2013 Author Share Posted August 21, 2013 no se como hacerlo :C Link to comment
BorderLine Posted August 21, 2013 Share Posted August 21, 2013 setVehicleColor(vehicle,r,g,b,255,0,0) -- el segundo color sera el rojo Ve hay con los RGB si quieres que el segundo color del vehiculo sea el mismo que el primero entonces setVehicleColor(vehicle,r,g,b,r,g,b) Link to comment
Recommended Posts