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

Wysłany: 2014-01-15, 12:14


Zgredek666

LUA






Wiek: 27
Na forum: 4863 dni
Posty: 251
Nick w MP: Zgredek

Piwa: 442

Respekt: 70,1

Witam. Mam problem gdy? po ?mierci nie dodaje mnie do teamu Truckerzy.

Oto kod:

local truck= createTeam( "Truckerzy", 0, 255, 0  )
 
 function playerLogin (thePlayer)
  if  not (isGuestAccount (getPlayerAccount (source))) then
    if (accountData) then
setPlayerTeam (thePlayer, truck )   
setElementModel (thePlayer, 133 ) 
setTimer (setPlayerTeam, 500, 1, source, truck)
    else
      spawnPlayer (source, -1710.66, 404.82, 7.41, 0, math.random (0, 288), 0, 0, truck)
    end   
end
end
addEventHandler ("onPlayerLogin", getRootElement(), playerLogin)

addEventHandler( "onPlayerWasted", getRootElement( ),
    function()
local truck = getPlayerTeam ( source )  
  if truck then                          
    setPlayerTeam ( source, nil )  
        setTimer( spawnPlayer, 2000, 1, source, 0, 0, 3 )
    end
end
)


Z g?ry dzi?kuj? za pomoc.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-01-15, 12:53


Piorun







Wiek: 33
Na forum: 6853 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

setPlayerTeam ( source, nil )


To na co?

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-01-15, 13:14


Zgredek666

LUA






Wiek: 27
Na forum: 4863 dni
Posty: 251
Nick w MP: Zgredek

Piwa: 442

Respekt: 70,1

Skasowanie tej linijki nie pomog?o.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-01-15, 18:03


luki123luki123

Place Game






Wiek: 28
Na forum: 5416 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6103

Respekt: 611
Respekt: 611Respekt: 611

?le:
[
    setPlayerTeam ( source, nill)  

Poprawnie

    setPlayerTeam ( source, truck )  

nill to nie jest local teamu. nill to warto?? 0

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-01-17, 13:53


Zgredek666

LUA






Wiek: 27
Na forum: 4863 dni
Posty: 251
Nick w MP: Zgredek

Piwa: 442

Respekt: 70,1

Niesety dalej nie dzia?a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-01-17, 15:41


Jacob

Głupiomądry






Wiek: 28
Na forum: 5643 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

Poka? sw?j kod.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-01-17, 18:15


luki123luki123

Place Game






Wiek: 28
Na forum: 5416 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6103

Respekt: 611
Respekt: 611Respekt: 611

Zgredek666, podaj ca?y kod

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-01-17, 21:32


Zgredek666

LUA






Wiek: 27
Na forum: 4863 dni
Posty: 251
Nick w MP: Zgredek

Piwa: 442

Respekt: 70,1

To jest ca?y kod trucker?w

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-01-17, 22:04


luki123luki123

Place Game






Wiek: 28
Na forum: 5416 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6103

Respekt: 611
Respekt: 611Respekt: 611

local truck= createTeam( "Truckerzy", 0, 255, 0  )
 
 function playerLogin (thePlayer)
  if  not (isGuestAccount (getPlayerAccount (source))) then
    if (accountData) then
setPlayerTeam (thePlayer, truck )   
setElementModel (thePlayer, 133 ) 
setTimer (setPlayerTeam, 500, 1, source, truck)
    else
      spawnPlayer (source, -1710.66, 404.82, 7.41, 0, math.random (0, 288), 0, 0, truck)
    end   
end
end
addEventHandler ("onPlayerLogin", getRootElement(), playerLogin)

addEventHandler( "onPlayerWasted", getRootElement( ),
    function()            
    setPlayerTeam ( source, truck )  
        setTimer( spawnPlayer, 2000, 1, source, 0, 0, 3 )
end
)


[ Dodano: 2014-01-17, 22:08 ]
2 sposob:
local TeamTruck= createTeam( "Truckerzy", 0, 255, 0  )
 
function playerLogin (thePlayer)
  if  not (isGuestAccount (getPlayerAccount (thePlayer))) then
    if (accountData) then
setPlayerTeam (thePlayer, TeamTruck )   
setElementModel (thePlayer, 133 ) 
setTimer (setPlayerTeam, 500, 1, thePlayer, TeamTruck)
    else
      spawnPlayer (thePlayer, -1710.66, 404.82, 7.41, 0, math.random (0, 288), 0, 0, TeamTruck)
    end   
end
end
addEventHandler ("onPlayerLogin", getRootElement(), playerLogin)

function respawn(thePlayer)            
    setPlayerTeam ( thePlayer, TeamTruck )  
        setTimer( spawnPlayer, 2000, 1, thePlayer, 0, 0, 3 )
end
addEventHandler( "onPlayerWasted", getRootElement( ), respawn)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-01-18, 10:51


Zgredek666

LUA






Wiek: 27
Na forum: 4863 dni
Posty: 251
Nick w MP: Zgredek

Piwa: 442

Respekt: 70,1

2 spos?b wogule mnie nie dodaje a 1 nie respi w truckerach.

Postaw piwo autorowi tego posta
 

 
Tagi: śmierci :: nie :: dodaje :: teamu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA 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