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

Wysłany: 2018-03-29, 19:53


GrzybcioPL00

Uczeń LUA Pomagacz






Wiek: 23
Na forum: 3499 dni
Posty: 97
Nick w MP: Siwexx

Piwa: 17

Respekt: 50

Witam ot?? mam problem poniewa? do scoreboardu potrzebny jest elementdata frakcji i nie wiem jak go doda? kto? by zedytowa? ten kod i by mi doda? elemndate frakcja ? Dam zimne :piwo: I respekt! :)
Kod:

Administracja = createTeam ( "Administracja", 255, 0, 0 )

function AdminiXD ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Admin" ) ) then
setPlayerTeam ( thePlayer, Administracja )
else
outputChatBox( "Nie jestes administratorem!", thePlayer, 255, 0, 0, false)
end
end
addCommandHandler ( "dutyadmin", AdminiXD )

Support = createTeam ( "Support", 0, 255, 0 )

function SapkiXD ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Moderator" ) ) then
setPlayerTeam ( thePlayer, Support )
else
outputChatBox( "Nie jestes Supportem!", thePlayer, 255, 0, 0, false)
end
end
addCommandHandler ( "dutysupport", SapkiXD )

PSP = createTeam ( "PSP", 255, 0, 0 )

function PSPXD ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "PSP" ) ) then
setPlayerTeam ( thePlayer, PSP )
else
outputChatBox( "Nie jestes w PSP!", thePlayer, 255, 0, 0, false)
end
end
addCommandHandler ( "dutypsp", PSPXD )

OSP = createTeam ( "OSP", 255, 0, 0 )

function OSPXD ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "OSP" ) ) then
setPlayerTeam ( thePlayer, OSP )
else
outputChatBox( "Nie jestes w OSP!", thePlayer, 255, 0, 0, false)
end
end
addCommandHandler ( "dutyosp", OSPXD )

KGP = createTeam ( "KGP", 016, 044, 084 )

function KGPXD ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "KGP" ) ) then
setPlayerTeam ( thePlayer, KGP )
else
outputChatBox( "Nie jestes Policjantem.", thePlayer, 255, 0, 0, false)
end
end
addCommandHandler ( "dutykgp", KGPXD )



Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-29, 20:35


jagoreq







Wiek: 24
Na forum: 3221 dni
Posty: 221
Nick w MP: dwd

Piwa: 18

Respekt: 66,3

Ostrzeżeń: 20%
"GrzybcioPL00" napisał/a:

Witam ot?? mam problem poniewa? do scoreboardu potrzebny jest elementdata frakcji i nie wiem jak go doda? kto? by zedytowa? ten kod i by mi doda? elemndate frakcja ? Dam zimne :piwo: I respekt! :)
Kod:

Administracja = createTeam ( "Administracja", 255, 0, 0 )

function AdminiXD ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Admin" ) ) then
setPlayerTeam ( thePlayer, Administracja )
else
outputChatBox( "Nie jestes administratorem!", thePlayer, 255, 0, 0, false)
end
end
addCommandHandler ( "dutyadmin", AdminiXD )

Support = createTeam ( "Support", 0, 255, 0 )

function SapkiXD ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Moderator" ) ) then
setPlayerTeam ( thePlayer, Support )
else
outputChatBox( "Nie jestes Supportem!", thePlayer, 255, 0, 0, false)
end
end
addCommandHandler ( "dutysupport", SapkiXD )

PSP = createTeam ( "PSP", 255, 0, 0 )

function PSPXD ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "PSP" ) ) then
setPlayerTeam ( thePlayer, PSP )
else
outputChatBox( "Nie jestes w PSP!", thePlayer, 255, 0, 0, false)
end
end
addCommandHandler ( "dutypsp", PSPXD )

OSP = createTeam ( "OSP", 255, 0, 0 )

function OSPXD ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "OSP" ) ) then
setPlayerTeam ( thePlayer, OSP )
else
outputChatBox( "Nie jestes w OSP!", thePlayer, 255, 0, 0, false)
end
end
addCommandHandler ( "dutyosp", OSPXD )

KGP = createTeam ( "KGP", 016, 044, 084 )

function KGPXD ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "KGP" ) ) then
setPlayerTeam ( thePlayer, KGP )
else
outputChatBox( "Nie jestes Policjantem.", thePlayer, 255, 0, 0, false)
end
end
addCommandHandler ( "dutykgp", KGPXD )



getElementData(plr"frakcja")


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-29, 20:43


GrzybcioPL00

Uczeń LUA Pomagacz






Wiek: 23
Na forum: 3499 dni
Posty: 97
Nick w MP: Siwexx

Piwa: 17

Respekt: 50

Gdzie to wpisa?? Poprosi? bym ca?y kod :P

[ Dodano: 2018-03-29, 21:06 ]
jagoreq, Wiesz gdzie to dodac? Jak bys podal to :piwo: i respekt!

[ Dodano: 2018-03-29, 21:46 ]
Nadal tego nei rozwi?za?em pomocy! :(

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-29, 23:10


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

Nie testowane,

Administracja createTeam "Administracja"2550) 

function AdminiXD thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Admin" ) ) then 
setPlayerTeam thePlayerAdministracja ) 
else 
outputChatBox"Nie jestes administratorem!"thePlayer25500falseend 
end 
addCommandHandler "dutyadmin"AdminiXD Support createTeam "Support"0255) 

function SapkiXD thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "Moderator" ) ) then 
setPlayerTeam thePlayerSupport ) 
else 
outputChatBox"Nie jestes Supportem!"thePlayer25500falseend 
end 
addCommandHandler "dutysupport"SapkiXD PSP createTeam "PSP"2550) 

function PSPXD thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "PSP" ) ) then 
setPlayerTeam thePlayerPSP setElementData (thePlayer"frakcja""PSP")
else 
outputChatBox"Nie jestes w PSP!"thePlayer25500falseend 
end 
addCommandHandler "dutypsp"PSPXD OSP createTeam "OSP"2550) 

function OSPXD thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "OSP" ) ) then 
setPlayerTeam thePlayerOSP setElementData (thePlayer"frakcja""OSP")
else 
outputChatBox"Nie jestes w OSP!"thePlayer25500falseend 
end 
addCommandHandler "dutyosp"OSPXD KGP createTeam "KGP"016044084 ) 

function KGPXD thePlayer local playerName getAccountName getPlayerAccount thePlayer ) ) 
if isObjectInACLGroup "user." .. playerNameaclGetGroup "KGP" ) ) then 
setPlayerTeam thePlayerKGP setElementData (thePlayer"frakcja""KGP")
else 
outputChatBox"Nie jestes Policjantem."thePlayer25500falseend 
end 
addCommandHandler "dutykgp"KGPXD )


Przy odczycie robisz,

getElementData plr "frakcja" )


Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
GrzybcioPL00
Wysłany: 2018-03-29, 23:46


GrzybcioPL00

Uczeń LUA Pomagacz






Wiek: 23
Na forum: 3499 dni
Posty: 97
Nick w MP: Siwexx

Piwa: 17

Respekt: 50

Dzi?kuje kolego!!!!!! Pomog?e? dostajesz piwerko i respekt Administracja Mo?ecie zamkn?? temat

Podpis
”Zawsze pisz kod tak, jakby gość, który ma się nim zajmować był agresywnym psychopatą, który wie, gdzie mieszkasz” – Martin Golding
Postaw piwo autorowi tego posta
 

 
Tagi: elementdata :: frakcji
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