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

Wysłany: 2018-07-26, 12:01


adisonboss







Wiek: 23
Na forum: 3472 dni
Posty: 237

Piwa: 6

Respekt: 50

Witam mam problem z frakcj? PR. Ot?? w og?le skrypt si? nie uruchamia i wyskakuje taki b??d w DB3 https://imgur.com/a/hlNmppF . Chce doda? ?e robi?em ju? frakcje PSP,OSP i PD w ten sam spos?b i nie mia?em problemu.

ZA POMOC R* I :piwo:


markerpolicja1 = createMarker (-2573.63623, 649.67877, 14.49875, 'cylinder', 1.4, 255,255,255, 150)
--setElementInterior(markerpolicja1, 0)
Policja = createTeam ( "Pa?stwowe Ratownictwo Medyczne", 255,255,255 )
 
function policja ( thePlayer )
  local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
  local konto = getPlayerAccount( thePlayer ) -- get his account name
     if getAccountData(konto, "PR") then
    --local gracz = getPlayerFromName ( thePlayer ) 
    setElementData( thePlayer, "duty:PR", accName)
    outputChatBox ( "* Zacze?e? prac? w PR!",  thePlayer, r, g, b, true )
    outputChatBox ( "* Aby zako?czy? s?u?b? wpisz: /zakonczpr",  thePlayer, r, g, b, true )
    setPlayerTeam ( thePlayer, Pa?stwowe Ratownictwo Medyczne )
    setPlayerSkin ( thePlayer, 275)
    setPedArmor ( thePlayer, 100 )
    setPlayerNametagColor ( thePlayer, 255,255,255 )
 else
   outputChatBox ( "* Nie nale?ysz do frakcji Pa?stwowe Ratownictwo Medyczne!",  thePlayer, r, g, b, true )

end
end

--addCommandHandler("loginpr", policja)

function policja2 ( thePlayer )
if    getElementData( thePlayer, "duty:PR" , accName) then
    removeElementData( thePlayer,"duty:PR", accName)
    outputChatBox ( "* Zako?czy?e? prace w PR.",  thePlayer, r, g, b, true )
    setElementPosition ( thePlayer , -2284.54492, -169.79198, 35.36875)
    setPlayerTeam ( thePlayer, Everyone )
    setPlayerSkin ( thePlayer, 0)
    takeWeapon ( thePlayer, 42 )
    takeWeapon ( thePlayer, 23 )
    setPedArmor ( thePlayer, 0 )
    setPlayerNametagColor ( thePlayer, 255, 255, 255 )
    --elseif then
    --outputChatBox("* Nie jeste? na s?u?bie w PR", thePlayer)
end
end
addCommandHandler("zakonczpr", policja2)
addEventHandler("onMarkerHit",markerpolicja1,policja)
--addEventHandler("OnMarkerHit",markerpolicja2,policja2)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-26, 13:10


Hades.

Łiiiiiiiiii






Wiek: 22
Na forum: 4840 dni
Posty: 372
Nick w MP: Hades

Piwa: 3218

Respekt: 337,8
Respekt: 337,8Respekt: 337,8Respekt: 337,8


markerpolicja1 = createMarker (-2573.63623, 649.67877, 14.49875, 'cylinder', 1.4, 255,255,255, 150)
--setElementInterior(markerpolicja1, 0)
PRTeam = createTeam ( "Pa?stwowe Ratownictwo Medyczne", 255,255,255 )
 
function policja ( thePlayer )
     local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
     local konto = getPlayerAccount( thePlayer ) -- get his account name
    if getAccountData(konto, "PR") then
    --local gracz = getPlayerFromName ( thePlayer ) 
        setElementData( thePlayer, "duty:PR", accName)
        outputChatBox ( "* Zacze?e? prac? w PR!",  thePlayer, r, g, b, true )
        outputChatBox ( "* Aby zako?czy? s?u?b? wpisz: /zakonczpr",  thePlayer, r, g, b, true )
        setPlayerTeam ( thePlayer, PRTeam )
        setPlayerSkin ( thePlayer, 275)
        setPedArmor ( thePlayer, 100 )
       setPlayerNametagColor ( thePlayer, 255,255,255 )
     else
          outputChatBox ( "* Nie nale?ysz do frakcji Pa?stwowe Ratownictwo Medyczne!",  thePlayer, r, g, b, true )
    end
end

--addCommandHandler("loginpr", policja)

function policja2 ( thePlayer )
    if getElementData( thePlayer, "duty:PR" , accName) then
           removeElementData( thePlayer,"duty:PR", accName)
           outputChatBox ( "* Zako?czy?e? prace w PR.",  thePlayer, r, g, b, true )
           setElementPosition ( thePlayer , -2284.54492, -169.79198, 35.36875)
           setPlayerTeam ( thePlayer, Everyone )
           setPlayerSkin ( thePlayer, 0)
           takeWeapon ( thePlayer, 42 )
        takeWeapon ( thePlayer, 23 )
        setPedArmor ( thePlayer, 0 )
        setPlayerNametagColor ( thePlayer, 255, 255, 255 )
           --elseif then
           --outputChatBox("* Nie jeste? na s?u?bie w PR", thePlayer)
    end
end
addCommandHandler("zakonczpr", policja2)
addEventHandler("onMarkerHit",markerpolicja1,policja)
--addEventHandler("OnMarkerHit",markerpolicja2,policja2)

Prosze

Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507

Discord związany z pomocą: https://discord.gg/ttkQTsc
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
adisonboss
Tagi: frakcja
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