Wysłany: 2014-06-22, 23:03
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
maciek3286 , Wyskoczy mu b??d badArgument lub expected.
Wysłany: 2014-06-22, 23:06
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
PanMaszyna , niekoniecznie. niech sprawdzi i powinno mu zadzia?a?.
Podpis
"Ludzie będą zawsze dla ciebie źli, jeżeli konieczność nie zmusi ich do tego, by byli dobrzy" ~~ Niccolò Machiavelli
Wysłany: 2014-06-22, 23:07
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
maciek3286 , on robi taki b??d, ?e daje tak? sam? nazw? funkcji jak i teamu. Zmienna dostaje najnowsz? warto?? jako funkcja i nie robi si? nic.
Wysłany: 2014-06-22, 23:09
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
PanMaszyna , sorki nie doczyta?em sie dok?adnie kodu. to w takim wypadku wystarczy chyba tylko pozmienia? nazwy zmiennych team?w i powinno dzia?a?.
Podpis
"Ludzie będą zawsze dla ciebie źli, jeżeli konieczność nie zmusi ich do tego, by byli dobrzy" ~~ Niccolò Machiavelli
Wysłany: 2014-06-22, 23:10
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
maciek3286 , tak, lecz wyt?umacz mu to, ?e nale?y zmieni? jedynie nazwy zmiennych nie ca?ych nazw kodowych
Wysłany: 2014-06-22, 23:12
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
PanMaszyna , najlepiej to poprawi? i wys?a? mu tu gotowy kod jak to ma wygl?da?. niech sobie to przeanalizuje potem i sie nauczy na przysz?o??.
Podpis
"Ludzie będą zawsze dla ciebie źli, jeżeli konieczność nie zmusi ich do tego, by byli dobrzy" ~~ Niccolò Machiavelli
Wysłany: 2014-06-22, 23:13
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
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 )
politeamx = createTeam ( "Policja" , 0 , 100 , 255 )
Pogotowie = createTeam ( "Pogotowie" , 20 , 220 , 220 )
PomocDrogowa = createTeam ( "PomocDrogowa" , 200 , 30 , 230 )
Taxi = createTeam ( "Taxi" , 255 , 200 , 0 )
OSP = createTeam ( "OSP" , 250 , 0 , 0 )
PSP = createTeam ( "PSP" , 250 , 0 , 0 )
function Policja ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Policja" ) ) then
setPlayerTeam ( thePlayer , politeamx )
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 ( "loginpolicja" , Policja )
function Pogotowie ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Pogotowie" ) ) then
setPlayerTeam ( thePlayer , Pogotowie )
setElementModel ( thePlayer , 274 )
setElementPosition ( thePlayer , - 2549 , 672.90002441406 , 27.799999237061 )
else
outputChatBox ( "Nie jestes pracownikiem Pogotowia" , thePlayer , 20 , 220 , 220 , false )
end
end
addCommandHandler ( "loginpogo" , Pogotowie )
function PomocDrogowa ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "PomocDrogowa" ) ) then
setPlayerTeam ( thePlayer , PomocDrogowa )
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 ( "loginpd" , PomocDrogowa )
function OSP ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "OSP" ) ) then
setPlayerTeam ( thePlayer , OSP )
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 ( "loginosp" , OSP )
function Taxi ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Taxi" ) ) then
setPlayerTeam ( thePlayer , Taxi )
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 ( "logintaxi" , Taxi )
function PSP ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "PSP" ) ) then
setPlayerTeam ( thePlayer , PSP )
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 ( "loginpsp" , PSP )
Prosz? szanowny kolego
Licz? na
Wysłany: 2014-06-22, 23:19
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Wysłany: 2014-06-22, 23:20
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
Maximerr , jak juz robisz to zr?b to dok?adnie. zrobi?e? tylko z 1 frakcj?. tu masz ju? wszystkie poprawione.
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 )
politeamx = createTeam ( "Policja" , 0 , 100 , 255 )
pogoteamx = createTeam ( "Pogotowie" , 20 , 220 , 220 )
pdteamx = createTeam ( "PomocDrogowa" , 200 , 30 , 230 )
taxiteamx = createTeam ( "Taxi" , 255 , 200 , 0 )
ospteamx = createTeam ( "OSP" , 250 , 0 , 0 )
pspteamx = createTeam ( "PSP" , 250 , 0 , 0 )
function Policja ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Policja" ) ) then
setPlayerTeam ( thePlayer , politeamx )
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 ( "loginpolicja" , Policja )
function Pogotowie ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Pogotowie" ) ) then
setPlayerTeam ( thePlayer , pogoteamx )
setElementModel ( thePlayer , 274 )
setElementPosition ( thePlayer , - 2549 , 672.90002441406 , 27.799999237061 )
else
outputChatBox ( "Nie jestes pracownikiem Pogotowia" , thePlayer , 20 , 220 , 220 , false )
end
end
addCommandHandler ( "loginpogo" , Pogotowie )
function PomocDrogowa ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "PomocDrogowa" ) ) then
setPlayerTeam ( thePlayer , pdteamx )
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 ( "loginpd" , PomocDrogowa )
function OSP ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "OSP" ) ) then
setPlayerTeam ( thePlayer , ospteamx )
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 ( "loginosp" , OSP )
function Taxi ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Taxi" ) ) then
setPlayerTeam ( thePlayer , taxiteamx )
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 ( "logintaxi" , Taxi )
function PSP ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "PSP" ) ) then
setPlayerTeam ( thePlayer , pspteamx )
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 ( "loginpsp" , PSP )
Wysłany: 2014-06-22, 23:25
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Dzi?ki jeszcze raz panowie ! Naprawd? mi pomogli?cie Dorobi?em sobie tak do reszty frakcji i teraz wszystko dzia?a Dzi?kuj? !
[ Dodano : 2014-06-22, 23:26 ]
Nie trzeba, sam sobie dorobi?em reszt? na wz?r
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-23, 22:15
Fanciak
BOT
Wiek: 25 Na forum: 4446 dni Posty: 728
Nick w MP: Fanciak
Piwa : 1572
Mi to nie dzia?a... da?em ten kod do team.lua mete normaln? mam i na serwie nic... nie pojawia si? nic na TAB.
Pomocy, dam piwko.
Wysłany: 2014-06-24, 00:08
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
To zale?y gdzie to da?e?, bo jaj mam ca?kiem inaczej zrobione to. Nie mam go dodanego do resource, tylko jest to w moim gamemodzie Mog? pokaza? jak mam gamemoda zrobionego
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-24, 11:24
Fanciak
BOT
Wiek: 25 Na forum: 4446 dni Posty: 728
Nick w MP: Fanciak
Piwa : 1572
Rozumiem, ?e musz? do gamemodu swojego a nie do resources, tak ?
Wysłany: 2014-06-24, 14:18
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Tak, ale w mecie gamemodu musisz napisa? o tym skryptcie? Poda? jak ja mam ?
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-25, 00:00
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
< meta >
< script src = "?cie?ka" type = "server" />
</ meta >
W twoim przypadku b?dzie to server.
Tagi: frakcje
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: