|
Wysłany: 2013-07-16, 20:21
|
|
Zgredek666
LUA


Wiek: 27 Na forum: 4722 dni Posty: 251
Nick w MP: Zgredek
Piwa: 442
|
|
|
|
Witam!
Mam taki problem
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, 12, 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)
local playerName = getAccountName ( getPlayerAccount ( player ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then
setPlayerTeam(player, poli)
end
end
addEventHandler ( "onPlayerSpawn", getRootElement(), spawnWasted )
function spawnWasted ()
setTimer(spawnWasted, 3500, 1, source)
end
function playerWasted ( player )
spawnPlayer ( player, -1615.56445312, 681.64276123047, 7.1875, 325, math.random(19,25) )
fadeCamera( player, true)
local playerName = getAccountName ( getPlayerAccount ( player ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then
setPlayerTeam(player, poli)
end
end
addEventHandler ( "onPlayerWasted", getRootElement(), playerWasted )
addEventHandler( "onPlayerWasted", getRootElement( ),
function()
setTimer( spawnPlayer, 3500, 1, source, 0, 0, 3 )
end
)
Respi mnie w ostatniej frakcji pod TAB, a nie w tej w kt?rej jestem.
Za pomoc stawiam piwo.
|
|
|
|
|
|
|
Wysłany: 2013-07-18, 19:23
|
|
irvs126
www.lss-rp.pl


Wiek: 36 Na forum: 5461 dni Posty: 109
Nick w MP: irvs126
Piwa: 97
|
|
|
|
Bo sam mu kaza?e? respi? Ci? w teamie "poli"
function playerWasted ( player )
spawnPlayer ( player, -1615.56445312, 681.64276123047, 7.1875, 325, math.random(19,25) )
fadeCamera( player, true)
local playerName = getAccountName ( getPlayerAccount ( player ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then
setPlayerTeam(player, poli)
end
end
addEventHandler ( "onPlayerWasted", getRootElement(), playerWasted )
|
Podpis
[you] , Sprawdź pierwszy serwer Roleplay, stawiający duży nacisk na grę In Character!
www.lss-rp.pl
|
|
|
|
|
|
|
Wysłany: 2013-07-18, 22:19
|
|
Zgredek666
LUA


Wiek: 27 Na forum: 4722 dni Posty: 251
Nick w MP: Zgredek
Piwa: 442
|
|
|
|
Ale mi oto chodzi ?eby respi?o w poli a nie w ostatniej frakcji pod tab.
Oto kod po zmianach: [code]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, 12, 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 playerWasted ( player )
spawnPlayer ( player, -1615.56445312, 681.64276123047, 7.1875, 325, math.random(19,25) )
fadeCamera( player, true)
local playerName = getAccountName ( getPlayerAccount ( player ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Policja" ) ) then
setPlayerTeam(player, poli)
end
end
addEventHandler ( "onPlayerWasted", getRootElement(), playerWasted )
[/code]
A no i teraz mam siek? na debug.
Nadal nie dzia?a prosz? o pomoc.
|
|
|
|
|
|
|
|
| Tagi: coś :: jest :: nie :: tak? |
Anonymous


Na forum: 245 dni
Posty: 1

|
Anonymous Koniecznie zajrzyj na:
|
|
|
|
|