Witam jestem pocz?tkuj?cy w tworzeniu skrypt?w lua
lecz nie rozumiem jednego jak zrobi? by te teamy si? zapisywa?y poniewa? po ?mierci lub wyj?ciu z serwera i ponownym wej?ciu team znika a nie chce by tak by?o bo stwarza to problemy.
kod na team wygl?da tak:
[lua]Gracz = createTeam ( "Cywile", 255, 255, 255 )
politeamx = createTeam ( "Policja", 0, 100, 255 )
Pogoteamx = createTeam ( "Pogotowie", 20, 220, 220 )
PDteamx = createTeam ( "PomocDrogowa", 200, 30, 230 )
function Policja ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then
setPlayerTeam ( thePlayer, politeamx )
giveWeapon ( thePlayer, 31, 5000 )
giveWeapon ( thePlayer, 22, 5000 )
giveWeapon ( thePlayer, 3, 5000 )
setElementModel ( thePlayer, 281 )
setElementPosition ( thePlayer, -1616.0999755859, 683.29998779297, 7.1999998092651 )
else
outputChatBox( "Nie jestes pracownikiem Policji", thePlayer, 0, 100, 255, false)
end
end
addCommandHandler ( "loginpolicja", Policja )
function Pogotowie ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Pogotowie" ) ) then
setPlayerTeam ( thePlayer, Pogoteamx )
setElementModel ( thePlayer, 274 )
setElementPosition ( thePla... |