Wysłany: 2014-06-22, 20:00
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Wysłany: 2014-06-22, 20:09
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Kod:
function Chat(message, msgtype)
local Gracz = getPlayerName(source)
if (msgtype == 0) then
cancelEvent()
local red, green, blue = getPlayerNametagColor(source)
outputChatBox(""..Gracz..": "..message, root, red, green, blue, true)
end
end
addEventHandler("onPlayerChat", root, Chat)
Cywile = createTeam ( "Cywile", 255, 255, 255 )
PolicjaSF = createTeam ( "PolicjaSF", 0, 100, 255 )
PogotowieSF = createTeam ( "PogotowieSF", 20, 220, 220 )
PomocDrogowaSF = createTeam ( "PomocDrogowaSF", 200, 30, 230 )
Taxi = createTeam ( "TaxiSF", 255, 200, 0 )
OSPSF = createTeam ( "OSPSF", 250, 0, 0 )
PSPSF = createTeam ( "PSPSF", 250, 0, 0 )
function PolicjSFa ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "PolicjaSF" ) ) then
setPlayerTeam ( thePlayer, PolicjaSF )
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 ( "loginpolicjasf", PolicjaSF )
function PogotowieSF ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "PogotowiSFe" ) ) then
setPlayerTeam ( thePlayer, PogotowieSF )
setElementModel ( thePlayer, 274 )
setElementPosition ( thePlayer, -2549, 672.90002441406, 27.799999237061 )
else
outputChatBox( "Nie jestes pracownikiem Pogotowia", thePlayer, 20, 220, 220, false)
end
end
addCommandHandler ( "loginpogosf", PogotowieSF )
function PomocDrogowaSF ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "PomocDrogowaSF" ) ) then
setPlayerTeam ( thePlayer, PomocDrogowSFa )
setElementModel ( thePlayer, 260 )
setElementPosition ( thePlayer, -1539.1623535156, 475.25180053711, 6.8367257118225 )
else
outputChatBox( "Nie jestes pracownikiem PomocyDrogowej", thePlayer, 200, 30, 230, false)
end
end
addCommandHandler ( "loginpdsf", PomocDrogowaSF )
function OSP SF( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "OSPSF" ) ) then
setPlayerTeam ( thePlayer, OSPSF )
giveWeapon ( thePlayer, 42, 10000 )
setElementModel ( thePlayer, 277 )
setElementPosition ( thePlayer, -584.90002441406, -1055.8000488281, 23.5 )
else
outputChatBox( "Nie jestes pracownikiem OSP", thePlayer, 250, 0, 0, false)
end
end
addCommandHandler ( "loginospsf", OSPSF )
function TaxiSF ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "TaxiSF" ) ) then
setPlayerTeam ( thePlayer, TaxSF )
setElementModel ( thePlayer, 262 )
setElementPosition ( thePlayer, -1982.1999511719, 884.09997558594, 45.200000762939 )
else
outputChatBox( "Nie jestes pracownikiem Taxi", thePlayer, 255, 200, 0, false)
end
end
addCommandHandler ( "logintaxisf", TaxiSF )
function PSPSF ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "PSPSF" ) ) then
setPlayerTeam ( thePlayer, PSPSF )
giveWeapon ( thePlayer, 42, 10000 )
setElementModel ( thePlayer, 279 )
setElementPosition ( thePlayer, -2360.5, 148.30000305176, 34.5 )
else
outputChatBox( "Nie jestes pracownikiem PSP", thePlayer, 250, 0, 0, false)
end
end
addCommandHandler ( "loginpspsf", PSPSF )
Nazwy oczywi?cie da?em przypadkowe (w tym przypadku SF) ?eby po prostu sprawdzi?
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-22, 20:15
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
function PolicjSFa ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "PolicjaSF" ) ) then
setPlayerTeam ( thePlayer , PolicjaSF )
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 ( "loginpolicjasf" , PolicjaSF )
Spr?jrz na funkcj? nadan? na addCommandHandler ( PolicjaSF ), a na nazw? funkcji ( PolicjaSFa ).
Wysłany: 2014-06-22, 20:33
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Zmieni?em, teraz pisze, ?e nie nale?? do daje frakcji, mo?esz my?le? ?e nie zmieni?em w acl, ale zmieni?em, nie wiem o co chodzi pode?l? ci ACL i TEAM, mo?e ty wy?apiesz b??d
Kod:
<acl>
<group name="Cywile">
<acl name="Cywile"></acl>
<object name="user.*"></object>
<object name="resource.*"></object>
</group>
<group name="PomocDrogowaSF">
<acl name="PomocDrogowaSF"></acl>
<object name="user.Dawirzo"></object>
</group>
<group name="PogotowieSF">
<acl name="PogotowieSF"></acl>
<object name="user.Dawirzo"></object>
</group>
<group name="OSPSF">
<object name="user.Dawirzo"></object>
</group>
<group name="TaxiSF">
<acl name="TaxiSF"></acl>
<object name="user.Dawirzo"></object>
</group>
<group name="PSPSF">
<object name="user.Dawirzo"></object>
</group>
<group name="PolicjaSF">
<object name="user.Dawirzo"></object>
</group>
<group name="Moderator">
<acl name="Moderator"></acl>
<object name="resource.mapcycler"></object>
<object name="resource.mapmanager"></object>
<object name="resource.resourcemanager"></object>
<object name="resource.votemanager"></object>
</group>
<group name="SuperModerator">
<acl name="SuperModerator"></acl>
</group>
<group name="Admin">
<acl name="Admin"></acl>
<object name="resource.RPG"></object>
<object name="resource.admin"></object>
<object name="resource.webadmin"></object>
<object name="user.Dawirzo"></object>
</group>
<group name="Console">
<acl name="Admin"></acl>
<object name="user.Console"></object>
</group>
<group name="autoGroup_GuiEditor">
<acl name="autoACL_GuiEditor"></acl>
<object name="resource.GuiEditor"></object>
</group>
Kod:
function Chat(message, msgtype)
local Gracz = getPlayerName(source)
if (msgtype == 0) then
cancelEvent()
local red, green, blue = getPlayerNametagColor(source)
outputChatBox(""..Gracz..": "..message, root, red, green, blue, true)
end
end
addEventHandler("onPlayerChat", root, Chat)
Cywile = createTeam ( "Cywile", 255, 255, 255 )
PolicjaSF = createTeam ( "PolicjaSF", 0, 100, 255 )
PogotowieSF = createTeam ( "PogotowieSF", 20, 220, 220 )
PomocDrogowaSF = createTeam ( "PomocDrogowaSF", 200, 30, 230 )
TaxiSF = createTeam ( "TaxiSF", 255, 200, 0 )
OSPSF = createTeam ( "OSPSF", 250, 0, 0 )
PSPSF = createTeam ( "PSPSF", 250, 0, 0 )
function PolicjSF ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "PolicjaSF" ) ) then
setPlayerTeam ( thePlayer, PolicjaSF )
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 ( "loginpolicjasf", PolicjaSF )
function PogotowieSF ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "PogotowiSF" ) ) then
setPlayerTeam ( thePlayer, PogotowieSF )
setElementModel ( thePlayer, 274 )
setElementPosition ( thePlayer, -2549, 672.90002441406, 27.799999237061 )
else
outputChatBox( "Nie jestes pracownikiem Pogotowia", thePlayer, 20, 220, 220, false)
end
end
addCommandHandler ( "loginpogosf", PogotowieSF )
function PomocDrogowaSF ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "PomocDrogowaSF" ) ) then
setPlayerTeam ( thePlayer, PomocDrogowSF )
setElementModel ( thePlayer, 260 )
setElementPosition ( thePlayer, -1539.1623535156, 475.25180053711, 6.8367257118225 )
else
outputChatBox( "Nie jestes pracownikiem PomocyDrogowej", thePlayer, 200, 30, 230, false)
end
end
addCommandHandler ( "loginpdsf", PomocDrogowaSF )
function OSPSF( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "OSPSF" ) ) then
setPlayerTeam ( thePlayer, OSPSF )
giveWeapon ( thePlayer, 42, 10000 )
setElementModel ( thePlayer, 277 )
setElementPosition ( thePlayer, -584.90002441406, -1055.8000488281, 23.5 )
else
outputChatBox( "Nie jestes pracownikiem OSP", thePlayer, 250, 0, 0, false)
end
end
addCommandHandler ( "loginospsf", OSPSF )
function TaxiSF ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "TaxiSF" ) ) then
setPlayerTeam ( thePlayer, TaxiSF )
setElementModel ( thePlayer, 262 )
setElementPosition ( thePlayer, -1982.1999511719, 884.09997558594, 45.200000762939 )
else
outputChatBox( "Nie jestes pracownikiem Taxi", thePlayer, 255, 200, 0, false)
end
end
addCommandHandler ( "logintaxisf", TaxiSF )
function PSPSF ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "PSPSF" ) ) then
setPlayerTeam ( thePlayer, PSPSF )
giveWeapon ( thePlayer, 42, 10000 )
setElementModel ( thePlayer, 279 )
setElementPosition ( thePlayer, -2360.5, 148.30000305176, 34.5 )
else
outputChatBox( "Nie jestes pracownikiem PSP", thePlayer, 250, 0, 0, false)
end
end
addCommandHandler ( "loginpspsf", PSPSF )
[ Dodano : 2014-06-22, 20:34 ]
Oczywi?cie, w acl mam ni?ej te? co dane frakcje mog? (np. kick/mute itp.)
Ale to usun??em bo si? w odpowiedzi nie mie?ci?o
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-22, 20:41
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
U mnie dzia?a
Wysłany: 2014-06-22, 20:57
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
To co u mnie mo?e by? nie tak? ACL si? zgadza co do team Wi?c ja ju? nie wiem
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-22, 21:04
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Wysłany: 2014-06-22, 21:08
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Tylko to, ale chyba to nie z tym zwi?zane tylko z sireneditorem :
PreCreate sireneditor - guielements
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-22, 21:11
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Znowu masz b??d w kodzie... PolicjSF i PolicjaSF
[ Dodano : 2014-06-22, 21:13 ]
I zrozum, zmienna teamowa nie mo?e by? taka sama jak nazwa funkcji..
Wysłany: 2014-06-22, 21:16
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
No tak policja nie dzia?a?a, ale bardziej przejmuje si? tym ?e w acl pisze ?e jestem w pogotowiu, a jak pisze /loginpogosf to pisze ?e nie jestem
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-22, 21:18
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Maci?g , zajmijmy si? na razie policja, dzia?a ?
Wysłany: 2014-06-22, 21:27
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Dzia?a, ale nie tka jak powinna, bo nie jestem w teamie, ale mam pomys? Usun? ca?o?? i zaczniemy po kolei Od policji No to zaczynamy
[ Dodano : 2014-06-22, 21:31 ]
Kurcz?, wyskakuje mi pewien b??d, musz? zrobi? reinstalacj? MTA To mi zajmie jakie? 15min z wykonaniem wszystkiego Wi?c kolejny post napisz? za ok. 15min
[ Dodano : 2014-06-22, 22:12 ]
Nie rozumiem, teraz wyskakuje mi pewien b??d....nie wiem o co chodzi, zaraz ci skopiuje : [22:10] ERROR: Error parsing Access Control List file
[22:10] Server stopped!
Error: Could not start local server. [Error loading mod]
Jak nie dodam ?adnego skryptu, ani swojego gamemoda to jest git, ale wcze?niej dzia?a?o, tylko teraz si? popsu?o
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-22, 22:54
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
a mo?e zamiast
setPlayerTeam ( thePlayer , Policja )
Spr?buj tak
setPlayerTeam ( thePlayer , getTeamFromName ( "Policja" ) )
Wysłany: 2014-06-22, 22:56
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
maciek3286 , co ty wygadujesz ? Co ma pobranie teamu do zmiennej ?
Wysłany: 2014-06-22, 22:58
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
PanMaszyna , napisa?em tylko co mo?e zamieni? aby go przenosi?o do teamu. bez kombinowania.
Podpis
"Ludzie będą zawsze dla ciebie źli, jeżeli konieczność nie zmusi ich do tego, by byli dobrzy" ~~ Niccolò Machiavelli
Tagi: frakcje
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: