Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2013-11-16, 00:31


krydianero

Samotny Wilk






Wiek: 33
Na forum: 4924 dni
Posty: 395
Nick w MP: Yoshida

Piwa: 1799

Respekt: 117,3
Respekt: 117,3

Try this:

function createTeamsOnStart ()

teamCywile = createTeam ( "Cywile", 255, 255, 255 )
teamPolicja = createTeam ( "Policja", 0, 100, 255 )
teamPogotowie = createTeam ( "Pogotowie", 20, 220, 220 )
teamPomocDrogowa = createTeam ( "PomocDrogowa", 200, 30, 230 )
teamAmmonation = createTeam ( "Ammonation", 130, 130, 130 )
teamTaxi = createTeam ( "Taxi", 255, 200, 0 )
teamSalon = createTeam ( "Salon", 0, 255, 0 )
teamTrucker = createTeam ( "Trucker", 200, 140, 50 )


end

addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart  )
function zmianateamu( player,cmd)
if cmd == 'login1' then
  spawnPlayer ( player, -1579.8249291016, 661.786071777734, 7.1875 )
  setPlayerNametagColor ( player, 0, 100, 255 )
  giveWeapon ( player, 3, 1 )
  giveWeapon ( player, 22, 2000 )
  giveWeapon ( player, 27, 2000 )
  giveWeapon ( player, 32, 2000 )
  setPlayerTeam ( player, teamPolicja )
  setPedSkin ( player, 280 )
elseif cmd == 'login2' then
  spawnPlayer ( player, -2574.6616210938, 604.3790283031, 14.459196090698 )
  setPlayerNametagColor ( player, 20, 220, 220 )
  giveWeapon ( player, 14, 1 )
  setPlayerTeam ( player, teamPogotowie )
  setPedSkin ( player, 275 )
elseif cmd == 'login3' then
  spawnPlayer ( player, -1533.4854736328, 459.92144775391, 6.7057905197144 )
  setPlayerTeam ( player, teamPomocDrogowa )
  setPedSkin ( player, 50 )
elseif cmd == 'login4' then
  setPlayerNametagColor ( player, 130, 130, 130 )
  spawnPlayer ( player, 1534, -1477, 9.5 )
  setPlayerTeam ( player, teamAmmonation )
  setPedSkin ( player, 20 )
elseif cmd == 'login5' then
  setPlayerTeam ( player, teamTaxi )
  setPlayerNametagColor ( player, 255, 200, 0 )
  setPedSkin ( player, 0 )
elseif cmd == 'login6' then 
  setPlayerTeam ( player, teamSalon )
  setPlayerNametagColor ( player, 0, 255, 0 )
  spawnPlayer ( player, 2577, -1706, 13.5 )
  giveWeapon ( player, 24, 2000 )
  giveWeapon ( player, 29, 2000 )
  setPedSkin ( player, 106 )
elseif cmd == 'login7' then
  setPlayerTeam ( player, teamTrucker)
  setPlayerNametagColor ( player, 200, 140, 50 )
  spawnPlayer ( player, 2577, -1706, 13.5 )
  giveWeapon ( player, 24, 2000 )
  giveWeapon ( player, 29, 2000 )
  setPedSkin ( player, 106 )
end
end
addCommandHandler ( "login1", zmianateamu)
addCommandHandler ( "login2", zmianateamu)
addCommandHandler ( "login3", zmianateamu)
addCommandHandler ( "login4", zmianateamu)
addCommandHandler ( "login5", zmianateamu)
addCommandHandler ( "login6", zmianateamu)
addCommandHandler ( "login7", zmianateamu)

function docywili(player)
setPlayerTeam(player,teamCywile)
--inne kody je?li wymagane
end
addEventHandler('onPlayerLogin',getRootElement(),docywili)
addEventHandler('onPlayerJoin',getRootElement(),docywili)


Podpis

Multi Drive Unlimited:Nowy projekt już wkrótce

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 00:34


Olusia

Jestem Zła






Wiek: 28
Na forum: 5043 dni
Posty: 57
Nick w MP: Olusia

Piwa: 10

Respekt: 50

Teraz to mnie nie ma w teamie Cywile

Podpis
Jesli ci pomoglam to daj Piwo :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 00:37


krydianero

Samotny Wilk






Wiek: 33
Na forum: 4924 dni
Posty: 395
Nick w MP: Yoshida

Piwa: 1799

Respekt: 117,3
Respekt: 117,3

Bo skrypt dodaje do teamu po zalogowanij lub wej?cku na serwer (a komendy dzia?aj??)

Podpis

Multi Drive Unlimited:Nowy projekt już wkrótce

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 00:38


Olusia

Jestem Zła






Wiek: 28
Na forum: 5043 dni
Posty: 57
Nick w MP: Olusia

Piwa: 10

Respekt: 50

Komedy dzia?aj?

Podpis
Jesli ci pomoglam to daj Piwo :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 00:41


krydianero

Samotny Wilk






Wiek: 33
Na forum: 4924 dni
Posty: 395
Nick w MP: Yoshida

Piwa: 1799

Respekt: 117,3
Respekt: 117,3

dodaj na sam koniec:


addEventHandler('onResourceStart', getResourceRootElement(getThisResource()),docywili)

I b?dzie dodawa?o te? po starcie skryptu

Teraz wszystko powinno chula?. Mam nadziej? ?e pomog?em :)

Podpis

Multi Drive Unlimited:Nowy projekt już wkrótce

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 00:44


Olusia

Jestem Zła






Wiek: 28
Na forum: 5043 dni
Posty: 57
Nick w MP: Olusia

Piwa: 10

Respekt: 50

WARNING: RPG\team\team.lua:70: Bad 'player' pointer @ 'setPlayerTeam'(1)

[ Dodano: 2013-11-16, 00:46 ]
WARNING: RPG\team\team.lua:70: Bad argument @ 'setPlayerTeam'
[2013-11-16 00:44] WARNING: RPG\tabelka\scoreboard.lua:20: Bad argument @ 'setElementData' [Expected element at argument 1, got nil]
[2013-11-16 00:45] WARNING: RPG\RPG_S.lua:52: Access denied @ 'addAccount'
[2013-11-16 00:45] WARNING: RPG\team\team.lua:70: Bad 'player' pointer @ 'setPlayerTeam'(1)

Podpis
Jesli ci pomoglam to daj Piwo :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 00:49


krydianero

Samotny Wilk






Wiek: 33
Na forum: 4924 dni
Posty: 395
Nick w MP: Yoshida

Piwa: 1799

Respekt: 117,3
Respekt: 117,3

zamie? te dwie linijki:

Kod:


function docywili(player)
setPlayerTeam(player,teamCywile)

na :

function docywili()
setPlayerTeam(source,teamCywile)


Podpis

Multi Drive Unlimited:Nowy projekt już wkrótce

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 00:52


Olusia

Jestem Zła






Wiek: 28
Na forum: 5043 dni
Posty: 57
Nick w MP: Olusia

Piwa: 10

Respekt: 50

WARNING: RPG\team\team.lua:70: Bad 'player' pointer @ 'setPlayerTeam'(1)

Podpis
Jesli ci pomoglam to daj Piwo :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 00:54


krydianero

Samotny Wilk






Wiek: 33
Na forum: 4924 dni
Posty: 395
Nick w MP: Yoshida

Piwa: 1799

Respekt: 117,3
Respekt: 117,3

zamie? source na root lub je?li to nie pomorze to na getRootElement()

Podpis

Multi Drive Unlimited:Nowy projekt już wkrótce

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 00:58


Olusia

Jestem Zła






Wiek: 28
Na forum: 5043 dni
Posty: 57
Nick w MP: Olusia

Piwa: 10

Respekt: 50

Nie pomaga ;c
WARNING: RPG\team\team.lua:70: Bad 'player' pointer @ 'setPlayerTeam'(1)

Podpis
Jesli ci pomoglam to daj Piwo :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 01:00


krydianero

Samotny Wilk






Wiek: 33
Na forum: 4924 dni
Posty: 395
Nick w MP: Yoshida

Piwa: 1799

Respekt: 117,3
Respekt: 117,3

Daj to:
 
function docywili(thePlayer)
setPlayerTeam(thePlayer,teamCywile)


Podpis

Multi Drive Unlimited:Nowy projekt już wkrótce

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 01:04


Olusia

Jestem Zła






Wiek: 28
Na forum: 5043 dni
Posty: 57
Nick w MP: Olusia

Piwa: 10

Respekt: 50

WARNING: RPG\team\team.lua:71: Bad 'player' pointer @ 'setPlayerTeam'(1)

Podpis
Jesli ci pomoglam to daj Piwo :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 01:06


krydianero

Samotny Wilk






Wiek: 33
Na forum: 4924 dni
Posty: 395
Nick w MP: Yoshida

Piwa: 1799

Respekt: 117,3
Respekt: 117,3

czemu teraz nagle jest linijka 71?

Podpis

Multi Drive Unlimited:Nowy projekt już wkrótce

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 01:11


Olusia

Jestem Zła






Wiek: 28
Na forum: 5043 dni
Posty: 57
Nick w MP: Olusia

Piwa: 10

Respekt: 50

Ja robie co ty mi ka?esz

Podpis
Jesli ci pomoglam to daj Piwo :]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-11-16, 15:19


cayman11







Wiek: 30
Na forum: 5089 dni
Posty: 73



Respekt: 50

No dobra... nie wiem czy ci? dobrze zrozumia?em ale sprawd? to.
Tylko tutaj jest pytanie czy masz pododawane do acl: Policja itd abymogli si? logowa??
PS. U mnie wszystko ?adnie chodzi :) pami?taj o propozycji kt?ra ci wys?a?em na PW :)

Kod
--tworzenie teamow
cywile = createTeam ( "Cywile", 255, 255, 255 ) 
policja = createTeam ( "Policja", 0, 100, 255 ) 
pogotowie = createTeam ( "Pogotowie", 20, 220, 220 ) 
pomocdrogowa = createTeam ( "PomocDrogowa", 200, 30, 230 ) 
ammo = createTeam ( "Ammonation", 130, 130, 130 ) 
taxi = createTeam ( "Taxi", 255, 200, 0 ) 
salon = createTeam ( "Salon", 100, 255, 100 ) 
trucker = createTeam ( "Trucker", 200, 140, 50 ) 

--logowanie do cywile
function logowaniedocywilow()
setPlayerNametagColor(source, 255, 255, 255)
setPlayerTeam(source, cywile)
--inne kody je?li wymagane
end
addEventHandler("onPlayerLogin", getRootElement(), logowaniedocywilow)

--logowanie do policja
function policja ( player ) 
local playerName = getAccountName ( getPlayerAccount ( player ) )    
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then 
setPlayerTeam ( player, policja ) 
giveWeapon ( player, 31, 5000 ) 
giveWeapon ( player, 22, 5000 ) 
giveWeapon ( player, 3, 5000 ) 
setElementModel ( player, 285 ) 
setElementPosition ( player, -1539.1623535156, 475.25180053711, 6.8367257118225 ) 
else 
outputChatBox( "Nie jestes pracownikiem Policji", player, 255, 0, 0, false) 
end 
end 
addCommandHandler ( "loginpolicja", policja ) 

--logowanie do pogotowie
function pogotowie ( player ) 
local playerName = getAccountName ( getPlayerAccount ( player ) )    
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Pogotowie" ) ) then 
setPlayerTeam ( player, pogotowie ) 
giveWeapon ( player, 12, 10000 ) 
setElementModel ( player, 70 ) 
setElementPosition ( player, -1539.1623535156, 475.25180053711, 6.8367257118225 ) 
else 
outputChatBox( "Nie jestes pracownikiem Pogotowia", player, 255, 0, 0, false) 
end 
end 
addCommandHandler ( "loginpogo", pogotowie ) 

--logowanie do pomocdrogowa
function pomocdrogowa ( player ) 
local playerName = getAccountName ( getPlayerAccount ( player ) )    
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "PomocDrogowa" ) ) then 
setPlayerTeam ( player, pomocdrogowa ) 
giveWeapon ( player, 12, 10000 ) 
setElementModel ( player, 50 ) 
setElementPosition ( player, -1539.1623535156, 475.25180053711, 6.8367257118225 ) 
else 
outputChatBox( "Nie jestes pracownikiem PomocyDrogowej", player, 255, 0, 0, false) 
end 
end 
addCommandHandler ( "loginpd", pomocdrogowa ) 

--logowanie ammonation
function ammonation ( player ) 
local playerName = getAccountName ( getPlayerAccount ( player ) )    
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Ammonation" ) ) then 
setPlayerTeam ( player, ammo ) 
giveWeapon ( player, 12, 10000 ) 
setElementModel ( player, 50 ) 
setElementPosition ( player, -1539.1623535156, 475.25180053711, 6.8367257118225 ) 
else 
outputChatBox( "Nie jestes pracownikiem Ammonation", player, 255, 0, 0, false) 
end 
end 
addCommandHandler ( "loginpammo", ammonation ) 

--logowanie salon
function salon ( player ) 
local playerName = getAccountName ( getPlayerAccount ( player ) )    
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Salon" ) ) then 
setPlayerTeam ( player, salon ) 
giveWeapon ( player, 12, 10000 ) 
setElementModel ( player, 50 ) 
setElementPosition ( player, -1539.1623535156, 475.25180053711, 6.8367257118225 ) 
else 
outputChatBox( "Nie jestes pracownikiem Salonu", player, 255, 0, 0, false) 
end 
end 
addCommandHandler ( "loginsalon", salon ) 

--logowanie taxi
function taxi ( player ) 
local playerName = getAccountName ( getPlayerAccount ( player ) )    
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Taxi" ) ) then 
setPlayerTeam ( player, taxi ) 
giveWeapon ( player, 12, 10000 ) 
setElementModel ( player, 50 ) 
setElementPosition ( player, -1539.1623535156, 475.25180053711, 6.8367257118225 ) 
else 
outputChatBox( "Nie jestes pracownikiem Taxi", player, 255, 0, 0, false) 
end 
end 
addCommandHandler ( "logintaxi", taxi ) 

--logowanie trucker
function trucker ( player ) 
local playerName = getAccountName ( getPlayerAccount ( player ) )    
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Trucker" ) ) then 
setPlayerTeam ( player, trucker ) 
giveWeapon ( player, 12, 10000 ) 
setElementModel ( player, 50 ) 
setElementPosition ( player, -1539.1623535156, 475.25180053711, 6.8367257118225 ) 
else 
outputChatBox( "Nie jestes pracownikiem Trucker", player, 255, 0, 0, false) 
end 
end 
addCommandHandler ( "logintruck", trucker )



Postaw piwo autorowi tego posta
 

 
Tagi: jak :: wyłączyć :: kolory :: nicku?
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Jak wyłączyć kolory w nicku? Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku