Wysłany: 2017-06-23, 19:29
DaVeCS
Mapper
Wiek: 31 Na forum: 3386 dni Posty: 193
Nick w MP: DaVe
Piwa : 59
Witajcie, ot?? mam taki b??d i nie wiem co z tym zrobi?
[2017-06-23 19] SCRIPT ERROR: [frakcje]/frakcja/s_skins.lua:68: unexpected symbol near 'for'
[2017-06-23 19] ERROR: Loading script failed: [frakcje]/frakcja/s_skins.lua:68: unexpected symbol near 'for'
Kod Skryptu:
local skins ={
[ "SAMA" ]={
code = "SAMA" ,
positions ={
{- 2722.25 , 688.96 , 51.23 , 274 , "Skin ratownika" , 0 , 0 , 2 },
{- 2714.70 , 689.31 , 51.23 , 70 , "Skin Kadra" , 0 , 0 , 9 },
{- 2736.32 , 690.61 , 51.23 , 275 , "Skin Pielegniarzy" , 0 , 0 },
{- 2734.68 , 682.11 , 51.23 , 178 , "Skin Kobiety" , 0 , 0 },
},
text = "Nie jeste? zatrudniony do SAMA lub nie jeste? na s?u?bie!" ,
},
[ "SAPD" ]={
code = "SAPD" ,
positions ={
{- 6755.37 ,- 1467.76 , 97.26 , 310 , "Kadra" , 0 , 0 , 10 },
{- 6758.37 ,- 1467.76 , 97.26 , 309 , "Kadra" , 0 , 0 , 10 },
{- 6761.37 ,- 1467.76 , 97.26 , 285 , "SWAT" , 0 , 0 , 2 },
{- 6764.37 ,- 1467.76 , 97.26 , 284 , "SAPD1" , 0 , 0 , 2 },
{- 6766.37 ,- 1467.76 , 97.26 , 283 , "SAPD2" , 0 , 0 , 2 },
{- 6766.26 ,- 1464.93 , 97.26 , 282 , "SAPD3" , 0 , 0 , 3 },
{- 6766.26 ,- 1462.94 , 97.26 , 281 , "SAPD4" , 0 , 0 , 1 },
{- 6763.59 ,- 1463.09 , 97.26 , 311 , "SAPD5" , 0 , 0 , 4 },
{- 6760.26 ,- 1462.77 , 97.88 , 286 , "Gang Unit" , 0 , 0 , 4 },
},
text = "Nie jeste? zatrudniony do SAPD lub nie jeste? na s?u?bie!" ,
},
[ "PSP" ]={
code = "PSP" ,
positions ={
{ 1932 ,- 2005.63 , 18.00 , 266 , "Skin Kadry" , 0 , 0 , 5 },
{ 1932 + 1.8 ,- 2005.63 , 18.00 , 14 , "Skin ratownika" },
{ 1932 + 3.6 ,- 2005.63 , 18.00 , 87 , "Skin Nomex" },
{ 1932 + 5.4 ,- 2005.63 , 18.00 , 278 , "Skin po?arowy" , 0 , 0 , 2 },
{ 1930.77 , - 2008.47 , 18.00 , 77 , "Skin Kobiety" , 0 , 0 , 2 },
{ 1930.48 , - 2009.88 , 18.00 , 309 , "Skin Koszarowy" , 0 , 0 , 2 },
},
text = "Nie jeste? zatrudniony do PSP lub nie jeste? na s?u?bie!" ,
},
[ "TAXI" ]={
code = "TAXI" ,
positions ={
{ 246.86 , 149.52 , 1003.02 , 142 , "Skin Turbana" , 3 , 0 , 1 },
{ 246.36 , 161.52 , 1003.02 , 125 , "Skin Elegancika" , 3 , 0 , 20 },
{ 246.56 , 156.52 , 1003.02 , 126 , "Skin Gonciarza" , 3 , 0 , 10 },
{ 246.36 , 166.52 , 1003.02 , 61 , "Skin Pilota" , 3 , 0 , 30 }
},
text = "Nie jeste? zatrudniony do TAXI lub nie jeste? na s?u?bie!" ,
},
[ "ASA" ]={
code = "ASA" ,
positions ={
{ 255.05 , 1843.05 , 8.77 , 10 , "Kadra" , 0 , 0 , 0 },
{ 253.35 , 1843.35 , 8.77 , 15 , "Major" , 0 , 0 , 00 },
{ 251.36 , 1843.35 , 8.77 , 16 , "Kapral" , 0 , 0 , 0 },
{ 255.14 , 1845.07 , 8.77 , 30 , "Sier?ant" , 0 , 0 , 0 },
{ 254.85 , 1847.53 , 8.77 , 31 , "Szeregowy" , 0 , 0 , 0 },
text = "Nie jeste? zatrudniony do ASA lub nie jeste? na s?u?bie!" ,
},
for _ , skin in pairs ( skins ) do
for _ , pos in ipairs ( skin . positions ) do
local pickup = createPickup ( pos [ 1 ], pos [ 2 ], pos [ 3 ], 3 , 1275 , 2000 )
setElementDimension ( pickup , pos [ 7 ] or 0 )
setElementInterior ( pickup , pos [ 6 ] or 0 )
setElementData ( pickup , "p:faction" , tostring ( skin . code ))
setElementData ( pickup , "p:skin" , tonumber ( pos [ 4 ]))
setElementData ( pickup , "p:rank" , pos [ 8 ] or 1 )
local t = createElement ( "text" )
setElementDimension ( t , pos [ 7 ] or 0 )
setElementInterior ( t , pos [ 6 ] or 0 )
setElementData ( t , "name" , pos [ 5 ] or "Skin" )
setElementPosition ( t , pos [ 1 ], pos [ 2 ], pos [ 3 ])
end
end
addEventHandler ( "onPickupHit" , resourceRoot , function( el , md )
if getElementType ( el )~= "player" then return end
local faction = getElementData ( source , "p:faction" )
if not faction then return end
local skin = getElementData ( source , "p:skin" )
local rank = getElementData ( source , "p:rank" )
if not skin then return end
if not getPlayerFaction ( el , faction ) or getElementData ( el , "player:duty" ) ~= faction then
outputChatBox ( skins [ faction ]. text , el )
cancelEvent ()
return end
if rank then
if rank > getElementData ( el , "player:rank" ) then
outputChatBox ( skins [ faction ]. text , el )
cancelEvent ()
return end
end
setElementModel ( el , skin )
end )
Linijka 68
Ostatnio zmieniony przez DaVeCS 2017-06-23, 19:43, w całości zmieniany 1 raz
Wysłany: 2017-06-23, 19:32
Atroth
Wiek: 23 Na forum: 3677 dni Posty: 1089
Nick w MP: Atroth
Piwa : 4808
DaVeCS , Stosuj zacznik [lua][/lua]. Podaj dok?adnie, kt?ra to linijka.
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018
Wysłany: 2017-06-23, 19:43
DaVeCS
Mapper
Wiek: 31 Na forum: 3386 dni Posty: 193
Nick w MP: DaVe
Piwa : 59
Wysłany: 2017-06-23, 19:55
Szymczu
Programista bo tak
Wiek: 27 Na forum: 3435 dni Posty: 194
Nick w MP: Szymczu
Piwa : 36
Co? z t? tablic? jest nie tak daj no moment.
Ostatnio zmieniony przez Szymczu 2017-06-23, 20:10, w całości zmieniany 1 raz
Wysłany: 2017-06-23, 19:59
DaVeCS
Mapper
Wiek: 31 Na forum: 3386 dni Posty: 193
Nick w MP: DaVe
Piwa : 59
Ja nie wiem o co w tym chodzi, je?eli mo?ecie to wyt?umaczcie
Wysłany: 2017-06-23, 20:14
Szymczu
Programista bo tak
Wiek: 27 Na forum: 3435 dni Posty: 194
Nick w MP: Szymczu
Piwa : 36
Prosz?
local skins ={
[ "SAMA" ]={
code = "SAMA" ,
positions ={
{- 2722.25 , 688.96 , 51.23 , 274 , "Skin ratownika" , 0 , 0 , 2 },
{- 2714.70 , 689.31 , 51.23 , 70 , "Skin Kadra" , 0 , 0 , 9 },
{- 2736.32 , 690.61 , 51.23 , 275 , "Skin Pielegniarzy" , 0 , 0 },
{- 2734.68 , 682.11 , 51.23 , 178 , "Skin Kobiety" , 0 , 0 },
},
text = "Nie jeste? zatrudniony do SAMA lub nie jeste? na s?u?bie!" ,
},
[ "SAPD" ]={
code = "SAPD" ,
positions ={
{- 6755.37 ,- 1467.76 , 97.26 , 310 , "Kadra" , 0 , 0 , 10 },
{- 6758.37 ,- 1467.76 , 97.26 , 309 , "Kadra" , 0 , 0 , 10 },
{- 6761.37 ,- 1467.76 , 97.26 , 285 , "SWAT" , 0 , 0 , 2 },
{- 6764.37 ,- 1467.76 , 97.26 , 284 , "SAPD1" , 0 , 0 , 2 },
{- 6766.37 ,- 1467.76 , 97.26 , 283 , "SAPD2" , 0 , 0 , 2 },
{- 6766.26 ,- 1464.93 , 97.26 , 282 , "SAPD3" , 0 , 0 , 3 },
{- 6766.26 ,- 1462.94 , 97.26 , 281 , "SAPD4" , 0 , 0 , 1 },
{- 6763.59 ,- 1463.09 , 97.26 , 311 , "SAPD5" , 0 , 0 , 4 },
{- 6760.26 ,- 1462.77 , 97.88 , 286 , "Gang Unit" , 0 , 0 , 4 },
},
text = "Nie jeste? zatrudniony do SAPD lub nie jeste? na s?u?bie!" ,
},
[ "PSP" ]={
code = "PSP" ,
positions ={
{ 1932 ,- 2005.63 , 18.00 , 266 , "Skin Kadry" , 0 , 0 , 5 },
{ 1932 + 1.8 ,- 2005.63 , 18.00 , 14 , "Skin ratownika" },
{ 1932 + 3.6 ,- 2005.63 , 18.00 , 87 , "Skin Nomex" },
{ 1932 + 5.4 ,- 2005.63 , 18.00 , 278 , "Skin po?arowy" , 0 , 0 , 2 },
{ 1930.77 , - 2008.47 , 18.00 , 77 , "Skin Kobiety" , 0 , 0 , 2 },
{ 1930.48 , - 2009.88 , 18.00 , 309 , "Skin Koszarowy" , 0 , 0 , 2 },
},
text = "Nie jeste? zatrudniony do PSP lub nie jeste? na s?u?bie!" ,
},
[ "TAXI" ]={
code = "TAXI" ,
positions ={
{ 246.86 , 149.52 , 1003.02 , 142 , "Skin Turbana" , 3 , 0 , 1 },
{ 246.36 , 161.52 , 1003.02 , 125 , "Skin Elegancika" , 3 , 0 , 20 },
{ 246.56 , 156.52 , 1003.02 , 126 , "Skin Gonciarza" , 3 , 0 , 10 },
{ 246.36 , 166.52 , 1003.02 , 61 , "Skin Pilota" , 3 , 0 , 30 }
},
text = "Nie jeste? zatrudniony do TAXI lub nie jeste? na s?u?bie!" ,
},
[ "ASA" ]={
code = "ASA" ,
positions ={
{ 255.05 , 1843.05 , 8.77 , 10 , "Kadra" , 0 , 0 , 0 },
{ 253.35 , 1843.35 , 8.77 , 15 , "Major" , 0 , 0 , 00 },
{ 251.36 , 1843.35 , 8.77 , 16 , "Kapral" , 0 , 0 , 0 },
{ 255.14 , 1845.07 , 8.77 , 30 , "Sier?ant" , 0 , 0 , 0 },
{ 254.85 , 1847.53 , 8.77 , 31 , "Szeregowy" , 0 , 0 , 0 }
},
text = "Nie jeste? zatrudniony do ASA lub nie jeste? na s?u?bie!" ,
}
}
Wysłany: 2017-06-23, 20:19
DaVeCS
Mapper
Wiek: 31 Na forum: 3386 dni Posty: 193
Nick w MP: DaVe
Piwa : 59
Dzi?kuj?, dzia?a ju?. Temat do Zamkni?cia
Tagi: skiny :: frakcyjne
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: