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

Wysłany: 2012-09-02, 11:44


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Witam zrobi?em sobie teamy do mojego rpg i p?? nie dzia?a
oto kod :
mechanic createTeam "Pomoc Drogowa"1390139 )
medic createTeam "Pogotowie"32178170 )
Policja createTeam "Policja"00255 )
Swat createTeam "Swat"00255 )
salon createTeam "Salon samochodowy"25569)
taxi createTeam "Taxi"255215)
ammo createTeam "Ammonation"477979 )
ultra createTeam "Ultra-Trans"153255)
Niebieska createTeam "Niebiska Mafia"00150 )
Czarna createTeam "Czarna Mafia"00)
--55


function mechanic1 thePlayer )    
  local accName getAccountName getPlayerAccount thePlayer ) )
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Pomoc Drogowa" ) ) then
    setPlayerTeam thePlayermechanic )
      giveWeapon thePlayer1210000 )
      setPedArmor thePlayer100 )
      setElementModel thePlayer50 )
      setElementPosition thePlayer, -1522.34682.997.2 )
    setPlayerNametagColor thePlayer1390139 )
else
outputChatBox"Nie jestes pracownikiem PD"getRootElement())
end
end
addCommandHandler "loginpd"mechanic1 )


function u1 thePlayer )
local accName getAccountName getPlayerAccount thePlayer ) )        
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Salon samochodowy" ) ) then
    setPlayerTeam thePlayersalon )
      giveWeapon thePlayer1210000 )
      setPedArmor thePlayer100 )
      setElementModel thePlayer111 )
      setElementPosition thePlayer, -1954.25463.937.18  )
    setPlayerNametagColor thePlayer25569)
else
outputChatBox"Nie jestes pracownikiem salonu"getRootElement())
end
end
addCommandHandler "loginsalon"u1 )




function pogotowie1 thePlayer )
local accName getAccountName getPlayerAccount thePlayer ) )    
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Pogotowie" ) ) then
    setPlayerTeam thePlayermedic )
      giveWeapon thePlayer1410000 )
      setPedArmor thePlayer100 )
      setElementModel thePlayer274 )
      setElementPosition thePlayer, -2577.8974609375 584.5066528320314.102350234985 )
    setPlayerNametagColor thePlayer32178170 )
else

outputChatBox"Nie jestes pracownikiem Pogotowia"getRootElement())
end
end
addCommandHandler "loginpogo"pogotowie1 )

function Policja thePlayer )
local accName getAccountName getPlayerAccount thePlayer ) )    
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Policja" ) ) then
    setPlayerTeam thePlayerPolicja )
    giveWeapon thePlayer310000 )
    giveWeapon thePlayer3010000 )
    giveWeapon thePlayer2410000 )
      setPedArmor thePlayer50 )
      setElementModel thePlayer282 )
      setElementPosition thePlayer, -1615.04682.997.2 )
    setPlayerNametagColor thePlayer00255 )
else
outputChatBox"Nie jestes pracownikiem Policji"getRootElement())
end
end
addCommandHandler "loginpoli"Policja )

function Swat1 thePlayer )
local accName getAccountName getPlayerAccount thePlayer ) )    
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Swat" ) ) then
    setPlayerTeam thePlayerSwat )
    giveWeapon thePlayer310000 )
    giveWeapon thePlayer3010000 )
    giveWeapon thePlayer2410000 )
      setPedArmor thePlayer50 )
      setElementModel thePlayer282 )
      setElementPosition thePlayer, -1806.5653135 )
    setPlayerNametagColor thePlayer00255 )
else
outputChatBox"Nie jestes pracownikiem Policji"getRootElement())
end
end
addCommandHandler "loginswat"Swat1 )


function taxi1 thePlayer )
local accName getAccountName getPlayerAccount thePlayer ) )    
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Taxi" ) ) then
    setPlayerTeam thePlayertaxi )
      setElementModel thePlayer73 )
      setElementPosition thePlayer, -1712 99717 )
    setPlayerNametagColor thePlayer255215)
else
outputChatBox"Nie jestes pracownikiem Taxi"getRootElement())
end
end
addCommandHandler "logintaxi"taxi1 )

function ammo1 thePlayer )
local accName getAccountName getPlayerAccount thePlayer ) )    
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Ammonation" ) ) then
    setPlayerTeam thePlayerammo )
      setElementModel thePlayer73 )
      setElementPosition thePlayer, -2051 9036 )
    setPlayerNametagColor thePlayer477979 )

else

outputChatBox"Nie jestes pracownikiem Ammonation"getRootElement())
end
end
addCommandHandler "loginammo"ammo1 )

function ultra1 thePlayer )
local accName getAccountName getPlayerAccount thePlayer ) )    
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Petrol" ) ) then
    setPlayerTeam thePlayerultra )
      setElementModel thePlayer73 )
      setElementPosition thePlayer, -1513.15463.937.18 )
    setPlayerNametagColor thePlayer153255)
else
    outputChatBox"Nie jestes pracownikiem Petrol"getRootElement())
end
end
addCommandHandler "loginpetrol"ultra1 )


function Niebieska1 thePlayer )
local accName getAccountName getPlayerAccount thePlayer ) )    
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Niebieska" ) ) then
    setPlayerTeam thePlayerNiebieska )
    giveWeapon thePlayer310000 )
    giveWeapon thePlayer3010000 )
    giveWeapon thePlayer2410000 )
      setPedArmor thePlayer50 )
      setElementModel thePlayer282 )
      setElementPosition thePlayer, -2200.1275.8535.33 )
    setPlayerNametagColor thePlayer00255 )
else

outputChatBox"Nie jestes w gangu Niebieska Mafia"getRootElement())
end
end
addCommandHandler "loginn"Niebieska1 )


function Czarna1 thePlayer )
local accName getAccountName getPlayerAccount thePlayer ) )    
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Czarna" ) ) then
    setPlayerTeam thePlayerCzarna )
    giveWeapon thePlayer310000 )
    giveWeapon thePlayer3010000 )
    giveWeapon thePlayer2410000 )
      setPedArmor thePlayer50 )
      setElementModel thePlayer282 )
      setElementPosition thePlayer, -1522.431084.907.93 )
    setPlayerNametagColor thePlayer00255 )
else

outputChatBox"Nie jestes w gangu Czarna Mafia"getRootElement())
end
end
addCommandHandler "logincz"Czarna1 )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-02, 12:23


Riot

3X






Wiek: 29
Na forum: 5729 dni
Posty: 1123
Nick w MP: Riot/3X

Piwa: 286

Respekt: 123
Respekt: 123

Nosz...Specjalnie robi?em ten temat: http://www.gtao.pl/rady-dla-piszacych-vt68895.htm
Mo?e ?askawie napiszesz co nie dzia?a? Nie musieliby?my sprawdza? ca?ego kodu?!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-02, 15:11


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611


function mechanic1 thePlayer )    
  local accName getAccountName getPlayerAccount thePlayer ) )
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Pomoc Drogowa" ) ) then
    setPlayerTeam thePlayermechanic )
      giveWeapon thePlayer1210000 )
      setPedArmor thePlayer100 )
      setElementModel thePlayer50 )
      setElementPosition thePlayer, -1522.34682.997.2 )
    setPlayerNametagColor thePlayer1390139 )
else
outputChatBox"Nie jestes pracownikiem PD"getRootElement())
end
end
addCommandHandler "loginpd"mechanic1 )


function u1 thePlayer )
local accName getAccountName getPlayerAccount thePlayer ) )        
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Salon samochodowy" ) ) then
    setPlayerTeam thePlayersalon )
      giveWeapon thePlayer1210000 )
      setPedArmor thePlayer100 )
      setElementModel thePlayer111 )
      setElementPosition thePlayer, -1954.25463.937.18  )
    setPlayerNametagColor thePlayer25569)
else
outputChatBox"Nie jestes pracownikiem salonu"getRootElement())
end
end
addCommandHandler "loginsalon"u1 )




function pogotowie1 thePlayer )
local accName getAccountName getPlayerAccount thePlayer ) )    
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Pogotowie" ) ) then
    setPlayerTeam thePlayermedic )
      giveWeapon thePlayer1410000 )
      setPedArmor thePlayer100 )
      setElementModel thePlayer274 )
      setElementPosition thePlayer, -2577.8974609375 584.5066528320314.102350234985 )
    setPlayerNametagColor thePlayer32178170 )
else

outputChatBox"Nie jestes pracownikiem Pogotowia"getRootElement())
end
end
addCommandHandler "loginpogo"pogotowie1 )

function Policja thePlayer )
local accName getAccountName getPlayerAccount thePlayer ) )    
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Policja" ) ) then
    setPlayerTeam thePlayerPolicja )
    giveWeapon thePlayer310000 )
    giveWeapon thePlayer3010000 )
    giveWeapon thePlayer2410000 )
      setPedArmor thePlayer50 )
      setElementModel thePlayer282 )
      setElementPosition thePlayer, -1615.04682.997.2 )
    setPlayerNametagColor thePlayer00255 )
else
outputChatBox"Nie jestes pracownikiem Policji"getRootElement())
end
end
addCommandHandler "loginpoli"Policja )


Prosz? o pomoc daje piwka

Cywile zrobi?em team cywile i teraz cos nie dzia?a

function Cywile1 thePlayer )    
  local accName getAccountName getPlayerAccount thePlayer ) )
  if isObjectInACLGroup "user." .. accNameaclGetGroup "Default" ) ) then
    setPlayerTeam thePlayerCywile )
      setElementModel thePlayer)
      setElementPosition thePlayer, -1522.34682.997.2 )
    setPlayerNametagColor thePlayer00)
end
end
addEventHandler "onPlayerJoin"getRootElement(), Cywile1 )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-02, 15:39


Riot

3X






Wiek: 29
Na forum: 5729 dni
Posty: 1123
Nick w MP: Riot/3X

Piwa: 286

Respekt: 123
Respekt: 123

W twoim kodzie nie ma teamu "Cywile", to po pierwsze po drugie po co blokada na ACL? My?la?em ?e do cywil?w wszyscy maj? dost?p.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-02, 15:43


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Ziomek11, a addEventHandler ( "onPlayerJoin", getRootElement(), Cywile1 ) jest dobre ??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-02, 21:30


Riot

3X






Wiek: 29
Na forum: 5729 dni
Posty: 1123
Nick w MP: Riot/3X

Piwa: 286

Respekt: 123
Respekt: 123

A dlaczego mia?oby by? z?e? Zr?b ten team + ta blokada zb?dna, chocia? nie wiem jak to masz zaplanowane jak ma dzia?a? i b?dzie luksio.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-03, 11:05


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Ziomek11, jak kto? wejdzie i si? zaloguje w panelu logowania to ?eby przenosi?o

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-03, 13:51


Jacob

Głupiomądry






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

Piwa: 786

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

luki123luki123, zdarzenie onPlayerLogin + setPlayerTeam.

Mo?esz r?wnie? w swoim panelu logowania przypisa? do funkcji, kt?ra loguje setPlayerTeam.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-03, 15:04


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Jacob, ok dzia?a a te inne teamy co s? na tab a nie da si? zalogowa?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-03, 18:38


Riot

3X






Wiek: 29
Na forum: 5729 dni
Posty: 1123
Nick w MP: Riot/3X

Piwa: 286

Respekt: 123
Respekt: 123

setPlayerTeam(playergetTeamFromName("Gracze"))


W miejsce Gracze wiadome, nazwa teamu. DOK?ADNA NAZWA.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-09-03, 19:37


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

Ziomek11, dalej nic nie pisz? czy jestem w teamie ??


Policja createTeam "Policja"00255 )





function Policja thePlayer )
  local accName2 getAccountName getPlayerAccount thePlayer ) )    
  if isObjectInACLGroup "user." .. accName2aclGetGroup "Policja" ) ) then
    setPlayerTeam(thePlayergetTeamFromName("Policja"))
    giveWeapon thePlayer310000 )
    giveWeapon thePlayer3010000 )
    giveWeapon thePlayer2410000 )
      setPedArmor thePlayer50 )
      setElementModel thePlayer282 )
      setElementPosition thePlayer, -1615.04682.997.2 )
    setPlayerNametagColor thePlayer00255 )
else
outputChatBox"Nie jestes pracownikiem Policji"getRootElement())
end
end
addCommandHandler "loginpoli"Policja )


Postaw piwo autorowi tego posta
 

 
Tagi: teamy
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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