Nadal mam problem z frakcjami. Nie respi mnie w mojej frakcji tylko daje do ostatniej pod tab, lecz teraz pokazuje ?e w niej jestem. Bardzo prosz? o pomoc za poprawn? odpowied? daje piwo. Z g?ry dzi?ki.
Oto kod
local poli = createTeam( "Policja", 0, 0, 255 )
function poli1( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then
setPlayerTeam ( thePlayer, poli )
giveWeapon ( thePlayer, 13, 10000 )
setPedArmor ( thePlayer, 100 )
setElementModel ( thePlayer, 281 )
setElementPosition ( thePlayer, -1615.56445312, 681.64276123047, 7.1875 )
setPlayerNametagColor ( thePlayer, 0, 0, 255 )
else
outputChatBox( "Nie jestes pracownikiem Policji.", getRootElement())
end
end
addCommandHandler ( "loginpolicja", poli1 )
function spawnWasted(player)
spawnPlayer( player, -1615.56445312, 681.64276123047, 7.1875, 325, math.random(19,25) )
fadeCamera(player, true)
setCameraTarget(player, player)
takePlayerMoney( player, 0 )
takeAllWeapons( player )
local playerName = getAccountName ( getPlayerAccount ( player ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then
setPlayerTeam(player, poli)
end
end
function functionWasted()
setTimer(spawnWasted, 3500, 1, source)
end
addEventHandler("onPlayerWasted", getRootElement(), functionWasted)
rootElement = getRootElement()
function onPlayerSpawnHandler ( thePlayer )
spawnPlayer( player, -1615.56445312, 681.64276123047, 7.1875, 325, math.random(19,25) )
fadeCamera(player, true)
setCameraTarget(player, player)
takePlayerMoney( player, 0 )
takeAllWeapons( player )
local playerName = getAccountName ( getPlayerAccount ( player ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then
setPlayerTeam(player, poli)
end
end
addEventHandler( "onPlayerSpawn", rootElement, onPlayerSpawnHandler )
|