Wysłany: 2017-12-28, 22:41
adaskOO
Ten który patrzy
Wiek: 24 Na forum: 3732 dni Posty: 249
Nick w MP: adaskOO
Piwa : 3168
Witam, od niedawna zacze?em myslec nad zrobieniem frakcji policji, ko?ystaj?c z kodow i wlasnych dopiskow stworzy?em frakcje. Problem ot?? jest taki ?e gdy wchodze w pickup to nie dodaje mnie do frakcji kt?r? stworzy?em, oraz nie daje broni. Jedyne co dzia?a to, to ?e pokazuje pickup i gdy w niego wejde to jest dzwi?k, oraz Frakcja na Scoreboardzie. Oto kod:
marker1 = createPickup ( - 1614.6611328125 , 686.8173828125 , 7.1875 , 3 , 1275 , 0 , 0 )
Policja = createTeam ( "Policja" , 0 , 0 , 155 )
function policja ( thePlayer , pp )
if not pp then return end
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Policja" ) ) then
outputChatBox ( "* Otrzyma?es przedmioty, rozpoczynasz sluzbe." , thePlayer , r , g , b , true )
giveWeapon ( thePlayer , 3 , 9999 )
setPlayerTeam ( thePlayer , Policja )
setPlayerSkin ( thePlayer , 280 )
setPlayerNametagColor ( thePlayer , 179 , 29 , 53 )
setPlayerNametagText ( thePlayer , 0 , 0 , 155 )
setPlayerNametagColor ( thePlayer , 0 , 0 , 155 )
giveWeapon ( thePlayer , 23 , 9999 )
setPedSkin ( thePlayer , 280 )
giveWeapon ( thePlayer , 31 , 9999 )
giveWeapon ( thePlayer , 41 , 9999 )
end
end
addEventHandler ( "onPickupHit" , marker1 , policja )
A tutaj jeszcze meta:
< meta >
< script src = "Policja.lua" type = "server" />
</ meta >
Nie wiem co jest w nim nie tak, gdy restartuje skrypt consola nie pokazuje mi b??du, poprostu nie dodaje mnie do frakcji, nie zmienia skina, oraz nie daje broni. Licz? ?e kto? pomo?e i znajdzie bl?d w tym kodzie. Z g?ry dzi?kuje, oraz na pomoc stawiam zimne piwko.
Chcia?bym jeszcze tylko poinformowa?, ?e ten kod jest pisany na poradnikach z tego forum, lub wzorowany na innych skryptach. Pozdrawiam.
///edit Jestem dopisany do ACL
Wysłany: 2017-12-29, 00:16
piotr172
Wiek: 26 Na forum: 4417 dni Posty: 130
Piwa : 2329
marker1 = createPickup ( - 710.93604 , 945.70343 , 12.39574 , 3 , 1275 , 0 , 0 )
Policja = createTeam ( "Policja" , 0 , 0 , 155 )
function policja ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Policja" ) ) then
outputChatBox ( "* Otrzyma?es przedmioty, rozpoczynasz sluzbe." , thePlayer , r , g , b , true )
giveWeapon ( thePlayer , 3 , 9999 )
setPlayerTeam ( thePlayer , Policja )
setPlayerSkin ( thePlayer , 280 )
setPlayerNametagColor ( thePlayer , 179 , 29 , 53 )
setPlayerNametagText ( thePlayer , 0 , 0 , 155 )
setPlayerNametagColor ( thePlayer , 0 , 0 , 155 )
giveWeapon ( thePlayer , 23 , 9999 )
setPedSkin ( thePlayer , 280 )
giveWeapon ( thePlayer , 31 , 9999 )
giveWeapon ( thePlayer , 41 , 9999 )
end
end
addEventHandler ( "onPickupHit" , marker1 , policja )
Więcej szczegółów
Wystawiono 1 piw(a):adaskOO
Wysłany: 2017-12-29, 11:56
adaskOO
Ten który patrzy
Wiek: 24 Na forum: 3732 dni Posty: 249
Nick w MP: adaskOO
Piwa : 3168
"piotr172" napisał/a :
marker1 = createPickup ( - 710.93604 , 945.70343 , 12.39574 , 3 , 1275 , 0 , 0 )
Policja = createTeam ( "Policja" , 0 , 0 , 155 )
function policja ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Policja" ) ) then
outputChatBox ( "* Otrzyma?es przedmioty, rozpoczynasz sluzbe." , thePlayer , r , g , b , true )
giveWeapon ( thePlayer , 3 , 9999 )
setPlayerTeam ( thePlayer , Policja )
setPlayerSkin ( thePlayer , 280 )
setPlayerNametagColor ( thePlayer , 179 , 29 , 53 )
setPlayerNametagText ( thePlayer , 0 , 0 , 155 )
setPlayerNametagColor ( thePlayer , 0 , 0 , 155 )
giveWeapon ( thePlayer , 23 , 9999 )
setPedSkin ( thePlayer , 280 )
giveWeapon ( thePlayer , 31 , 9999 )
giveWeapon ( thePlayer , 41 , 9999 )
end
end
addEventHandler ( "onPickupHit" , marker1 , policja )
Dzi?kuje dzia?a, stawiam piwko!
Tagi: niedziałający :: skrypt :: policje.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: