Wysłany: 2013-07-09, 17:09
Zgredek666
LUA
Wiek: 27 Na forum: 4722 dni Posty: 251
Nick w MP: Zgredek
Piwa : 442
Witajcie.
Mam problem ze skryptem. Oto on
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)
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)
Chodzi oto ?e po dedni?ciu wywala mnie z frakcji i daje mnie na respa do ostatniej frakcji pod Tab, jednak mnie do niej nie dodaje.
I kolejna sprawa to prosi? bym o podpowied? jak zrobi? ?eby truckerzy mogli logowa? si? od razu a nie komend?.
Bardzo prosz? o pomoc.
Wysłany: 2013-07-09, 18:29
irvs126
www.lss-rp.pl
Wiek: 36 Na forum: 5461 dni Posty: 109
Nick w MP: irvs126
Piwa : 97
Podpinasz funkcje w kt?rej masz wrzucanie do Teamu pod onPlayerWasted
A co do wybierania automatycznego to podpinasz funkcje za pomoc? kt?rej gracz loguje si? do teamu truckerzy, pod Event onPlayerJoin
Podpis
[you]
, Sprawdź pierwszy serwer Roleplay, stawiający duży nacisk na grę In Character!
www.lss-rp.pl
Wysłany: 2013-07-09, 19:31
Zgredek666
LUA
Wiek: 27 Na forum: 4722 dni Posty: 251
Nick w MP: Zgredek
Piwa : 442
Ma to wygl?da? tak :
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)
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)
setPlayerTeam(theplayer, poli)
setElementModel ( thePlayer, 281 )
setElementPosition ( thePlayer, -1615.56445312, 681.64276123047, 7.1875 )
setPlayerNametagColor ( thePlayer, 0, 0, 255 )
setPedArmor ( thePlayer, 100 )
end
addEventHandler("onPlayerWasted", getRootElement(), functionWasted)
Ostatnio zmieniony przez Zgredek666 2013-07-09, 19:43, w całości zmieniany 1 raz
Wysłany: 2013-07-09, 19:43
vipSEBOvip
A poor begginer
Wiek: 26 Na forum: 5178 dni Posty: 597
Nick w MP: xSebaPL
Piwa : 77
Mu chodzi o to, ?e u?ywasz addEventHandler ( "onPlayerJoin" , getRootElement (), nazwafunkcji )
Tagi: frakcje :: poblemy :: respawn
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: