Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-02-04, 19:59


Qwertick

Coming soon...






Wiek: 23
Na forum: 3718 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2727

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

Witam mam taki problem i? nie mog? wzi??? skin?w NP z SAFD b??d w db3: ERROR: rpg_frakcje-skiny/s.lua:39: attempt to compare boolean with number

kod:
local skiny = {
{2556.9416503906, -1694.0617675781, 1339.9281005859, 20, "TCSA", 0, 1, 3, "Transporter", 0},
{2554.3986816406, -1694.0627441406, 1339.9281005859, 98, "TCSA", 0, 1, 2, "Kierowca", 0},
{2552.1311035156, -1693.9445800781, 1339.9281005859, 142, "TCSA", 0, 1, 1, "Adept", 0},
{2549.6760253906, -1694.0627441406, 1339.9281005859, 125, "TCSA", 0, 1, 4, "Vice Dyrektor", 0},
{2547.2795410156, -1693.9436035156, 1339.9281005859, 240, "TCSA", 0, 1, 5, "Dyrektor", 0},
{-2400.0405273438, -124.36698913574, 41.703285217285, 278, "SAFD", 0, 0, 4, "Kadra", 90},
{-2400.0395507812, -120.70292663574, 41.703285217285, 274, "SAFD", 0, 0, 5, "Ratownik", 90},
{-2400.0395507812, -115.68632507324, 41.703285217285, 277, "SAFD", 0, 0, 1, "Nomex", 90},
{-2400.0385742188, -112.06620788574, 41.703285217285, 201, "SAFD", 0, 0, 1, "Koszar?wka", 90},
{2546.2509765625, -1575.857421875, 1333.9281005859, 281, "SAPD", 0, 1, 2, "Posterunkowy", 0},
{2549.138671875, -1575.861328125, 1333.9281005859, 284, "SAPD", 0, 1, 3, "Sier?ant", 0},
{2552.2451171875, -1575.9482421875, 1333.9281005859, 286, "SAPD", 0, 1, 4, "Aspirant", 0},
{2554.1640625, -1570.9833984375, 1333.9281005859, 288, "SAPD", 0, 1, 5, "Komisarz", 90},
{2554.1630859375, -1567.5341796875, 1333.9281005859, 285, "SAPD", 0, 1, 2, "S.W.A.T", 90},
}

for i, v in ipairs(skiny) do
  local ped = createPed(v[4], v[1], v[2], v[3], v[10])
  markerSkiny = createMarker(v[1], v[2], v[3]-1, "cylinder", 1.5, 255, 255, 255, 0)
  setElementData(markerSkiny, "ped:skin", v[4])
  setElementData(markerSkiny, "ped:faction", v[5])
  setElementData(markerSkiny, "ped:rank", v[8])
  setElementData(ped, "name", v[9])
  setElementFrozen(ped, true)
  setElementInterior(ped, v[7])
  setElementDimension(ped, v[6])
  setElementInterior(markerSkiny, v[7])
  setElementDimension(markerSkiny, v[6])
end

addEventHandler("onMarkerHit", resourceRoot, function(hit)
  if getElementData(source, "ped:faction") ~= getElementData(hit, "user:faction") then return end
  if getElementData(source, "ped:rank")-1 >= getElementData(hit, "user:frank") then return end
  local skin = getElementData(source, "ped:skin") or 0
  setElementModel(hit, skin)
end)

Prosz? o szybk? pomoc!


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Dejvmistrz
Wysłany: 2017-02-04, 20:15


_Haze

Peace Yo!






Wiek: 25
Na forum: 4325 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

Wercio., kt?ra to linijka w tym kodzie?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-04, 20:19


Qwertick

Coming soon...






Wiek: 23
Na forum: 3718 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2727

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

Hazmudex, 39 tam jest b??d

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-04, 20:23


_Haze

Peace Yo!






Wiek: 25
Na forum: 4325 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

Wercio., w tym kodzie jest 37liniek podaj mi dok?adn? linijk?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-04, 20:38


Qwertick

Coming soon...






Wiek: 23
Na forum: 3718 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2727

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

"Hazmudex" napisał/a:

Wercio., w tym kodzie jest 37liniek podaj mi dok?adn? linijk?.

tu mam b??d: if getElementData(source, "ped:rank") -1 >= getElementData(hit, "user:frank") then return end
24 linia

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-04, 21:11


Pawel5321

Szkrypter






Wiek: 36
Na forum: 3950 dni
Posty: 237
Nick w MP: Pawell

Piwa: 2322

Respekt: 240
Respekt: 240Respekt: 240

to:
if getElementData(source, "ped:rank") -1 >= getElementData(hit, "user:frank")
zmie? na to:
if getElementData(source, "ped:rank") -1 >= getElementData(hit, "user:rank")

Postaw piwo autorowi tego posta
 

 
Tagi: skiny :: frakcji
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku