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

Wysłany: 2016-03-26, 17:34


Odważny

Początki LUA :P






Wiek: 25
Na forum: 3739 dni
Posty: 140
Nick w MP: ReseT_

Piwa: 166

Respekt: 50

AteX, Usun??em

Podpis
, pomogłem Ci? Wynagrodź mnie :piwo: :P
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-26, 17:42


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

"Odwa?ny" napisał/a:

AteX, Usun??em

I co dzia?a? Je?eli nie to albo ten zapis jest do poprawy albo co? jeszcze powoduje zmian? skina i mo?e jeszcze sprawd? db3.

Wgraj jeszcze ten zapis, bo tam nie wiadomo czemu by? skin zapisywany jako tekst, a nie liczba, mo?e to przez to.
function playerLogin (thePreviousAccounttheCurrentAccountautoLogin)
  if  not (isGuestAccount (getPlayerAccount (source))) then
    local accountData getAccountData (theCurrentAccount"funmodev2-money")
    if (accountDatathen
      local playerMoney getAccountData (theCurrentAccount"funmodev2-money")
      local playerSkin getAccountData (theCurrentAccount"funmodev2-skin")
      local playerHealth getAccountData (theCurrentAccount"funmodev2-health")
      local playerArmor getAccountData (theCurrentAccount"funmodev2-armor")
      local playerX getAccountData (theCurrentAccount"funmodev2-x")
      local playerY getAccountData (theCurrentAccount"funmodev2-y")
      local playerZ getAccountData (theCurrentAccount"funmodev2-z")
      local playerInt getAccountData (theCurrentAccount"funmodev2-int")
      local playerDim getAccountData (theCurrentAccount"funmodev2-dim")
      local playerWanted getAccountData (theCurrentAccount"funmodev2-wantedlevel")
     local playerTeam getAccountData (theCurrentAccount"funmodev2-Team")
      local playerWeaponID0 getAccountData (theCurrentAccount"funmodev2-weaponID0")
      local playerWeaponID1 getAccountData (theCurrentAccount"funmodev2-weaponID1")
      local playerWeaponID2 getAccountData (theCurrentAccount"funmodev2-weaponID2")
      local playerWeaponID3 getAccountData (theCurrentAccount"funmodev2-weaponID3")
      local playerWeaponID4 getAccountData (theCurrentAccount"funmodev2-weaponID4")
      local playerWeaponID5 getAccountData (theCurrentAccount"funmodev2-weaponID5")
      local playerWeaponID6 getAccountData (theCurrentAccount"funmodev2-weaponID6")
      local playerWeaponID7 getAccountData (theCurrentAccount"funmodev2-weaponID7")
      local playerWeaponID8 getAccountData (theCurrentAccount"funmodev2-weaponID8")
      local playerWeaponID9 getAccountData (theCurrentAccount"funmodev2-weaponID9")
      local playerWeaponID10 getAccountData (theCurrentAccount"funmodev2-weaponID10")
      local playerWeaponID11 getAccountData (theCurrentAccount"funmodev2-weaponID11")
      local playerWeaponID12 getAccountData (theCurrentAccount"funmodev2-weaponID12")
      local playerWeaponAmmo0 getAccountData (theCurrentAccount"funmodev2-weaponAmmo0")
      local playerWeaponAmmo1 getAccountData (theCurrentAccount"funmodev2-weaponAmmo1")
      local playerWeaponAmmo2 getAccountData (theCurrentAccount"funmodev2-weaponAmmo2")
      local playerWeaponAmmo3 getAccountData (theCurrentAccount"funmodev2-weaponAmmo3")
      local playerWeaponAmmo4 getAccountData (theCurrentAccount"funmodev2-weaponAmmo4")
      local playerWeaponAmmo5 getAccountData (theCurrentAccount"funmodev2-weaponAmmo5")
      local playerWeaponAmmo6 getAccountData (theCurrentAccount"funmodev2-weaponAmmo6")
      local playerWeaponAmmo7 getAccountData (theCurrentAccount"funmodev2-weaponAmmo7")
      local playerWeaponAmmo8 getAccountData (theCurrentAccount"funmodev2-weaponAmmo8")
      local playerWeaponAmmo9 getAccountData (theCurrentAccount"funmodev2-weaponAmmo9")
      local playerWeaponAmmo10 getAccountData (theCurrentAccount"funmodev2-weaponAmmo10")
      local playerWeaponAmmo11 getAccountData (theCurrentAccount"funmodev2-weaponAmmo11")
      local playerWeaponAmmo12 getAccountData (theCurrentAccount"funmodev2-weaponAmmo12")
      spawnPlayer (sourceplayerXplayerYplayerZ +10playerSkinplayerIntplayerDim)
      setPlayerMoney (sourceplayerMoney)
      setTimer (setElementHealth5001sourceplayerHealth)
      setTimer (setPedArmor5001sourceplayerArmor)
      setTimer (setPlayerWantedLevel5001sourceplayerWanted)
      giveWeapon(sourceplayerWeaponID0playerWeaponAmmo0true)
      giveWeapon(sourceplayerWeaponID1playerWeaponAmmo1false)
      giveWeapon(sourceplayerWeaponID2playerWeaponAmmo2false)
      giveWeapon(sourceplayerWeaponID3playerWeaponAmmo3false)
      giveWeapon(sourceplayerWeaponID4playerWeaponAmmo4false)
      giveWeapon(sourceplayerWeaponID5playerWeaponAmmo5false)
      giveWeapon(sourceplayerWeaponID6playerWeaponAmmo6false)
      giveWeapon(sourceplayerWeaponID7playerWeaponAmmo7false)
      giveWeapon(sourceplayerWeaponID8playerWeaponAmmo8false)
      giveWeapon(sourceplayerWeaponID9playerWeaponAmmo9false)
      giveWeapon(sourceplayerWeaponID10playerWeaponAmmo10false)
      giveWeapon(sourceplayerWeaponID11playerWeaponAmmo11false)
      giveWeapon(sourceplayerWeaponID12playerWeaponAmmo12false)
      setCameraTarget (sourcesource)
      fadeCamera(sourcetrue2.0)
    else
      spawnPlayer (source1481.0855712891, -1771.299682617218.7957534790040,7800)
      setPlayerMoney (source200)
      setCameraTarget (sourcesource)
      fadeCamera(sourcetrue2.0)  
    end   
  end
end
addEventHandler ("onPlayerLogin"getRootElement(), playerLogin)

function onLogout ()
    kickPlayer (sourcenil"Logging out is disallowed.")
end
addEventHandler ("onPlayerLogout"getRootElement(), onLogout)

function onQuit (quitTypereasonresponsibleElement)
  if not (isGuestAccount (getPlayerAccount (source))) then
    account getPlayerAccount (source)
    if (accountthen
      local x,y,getElementPosition (source)
      setAccountData (account"funmodev2-money"getPlayerMoney (source))
      setAccountData (account"funmodev2-skin"getPedSkin (source))
      setAccountData (account"funmodev2-health"getElementHealth (source))
      setAccountData (account"funmodev2-armor"getPedArmor (source))
      setAccountData (account"funmodev2-R"r)
      setAccountData (account"funmodev2-G"g)
      setAccountData (account"funmodev2-B"b)
      setAccountData (account"funmodev2-x"x)
      setAccountData (account"funmodev2-y"y)
      setAccountData (account"funmodev2-z"z)
      setAccountData (account"funmodev2-int"getElementInterior (source))
      setAccountData (account"funmodev2-dim"getElementDimension (source))
      setAccountData (account"funmodev2-wantedlevel"getPlayerWantedLevel (source))
      setAccountData (account"funmodev2-weaponID0"getPedWeapon (source0))
      setAccountData (account"funmodev2-weaponID1"getPedWeapon (source1))
      setAccountData (account"funmodev2-weaponID2"getPedWeapon (source2))
      setAccountData (account"funmodev2-weaponID3"getPedWeapon (source3))
      setAccountData (account"funmodev2-weaponID4"getPedWeapon (source4))
      setAccountData (account"funmodev2-weaponID5"getPedWeapon (source5))
      setAccountData (account"funmodev2-weaponID6"getPedWeapon (source6))
      setAccountData (account"funmodev2-weaponID7"getPedWeapon (source7))
      setAccountData (account"funmodev2-weaponID8"getPedWeapon (source8))
      setAccountData (account"funmodev2-weaponID9"getPedWeapon (source9))
      setAccountData (account"funmodev2-weaponID10"getPedWeapon (source10))
      setAccountData (account"funmodev2-weaponID11"getPedWeapon (source11))
      setAccountData (account"funmodev2-weaponID12"getPedWeapon (source12))
      setAccountData (account"funmodev2-weaponAmmo0"getPedTotalAmmo (source0))
      setAccountData (account"funmodev2-weaponAmmo1"getPedTotalAmmo (source1))
      setAccountData (account"funmodev2-weaponAmmo2"getPedTotalAmmo (source2))
      setAccountData (account"funmodev2-weaponAmmo3"getPedTotalAmmo (source3))
      setAccountData (account"funmodev2-weaponAmmo4"getPedTotalAmmo (source4))
      setAccountData (account"funmodev2-weaponAmmo5"getPedTotalAmmo (source5))
      setAccountData (account"funmodev2-weaponAmmo6"getPedTotalAmmo (source6))
      setAccountData (account"funmodev2-weaponAmmo7"getPedTotalAmmo (source7))
      setAccountData (account"funmodev2-weaponAmmo8"getPedTotalAmmo (source8))
      setAccountData (account"funmodev2-weaponAmmo9"getPedTotalAmmo (source9))
      setAccountData (account"funmodev2-weaponAmmo10"getPedTotalAmmo (source10))
      setAccountData (account"funmodev2-weaponAmmo11"getPedTotalAmmo (source11))
      setAccountData (account"funmodev2-weaponAmmo12"getPedTotalAmmo (source12))
    end
  end
end
addEventHandler ("onPlayerQuit"getRootElement(), onQuit)

function onWasted(totalAmmokillerkillerWeaponbodypartstealth)
  if notisGuestAccount (getPlayerAccount(source)) ) then
    local theWeapon getPedWeapon (source)
    local weaponAmmo getPedTotalAmmo (source)
    fadeCamera (sourcefalse)
    setTimer (spawnPlayer10001source2036.1735839844, -1413.056396484416.99218750getPedSkin (source), 00getPlayerTeam(source))
    setTimer (setCameraTarget12501sourcesource)
    setTimer (fadeCamera20001sourcetrue)
    setTimer (giveWeapon20001sourcetheWeaponweaponAmmotrue)
  end
end
addEventHandler ("onPlayerWasted"getRootElement(), onWasted)

---

function setTeam()
local account getPlayerAccount(source) -- gets players account
local team getAccountData (account"team") -- gets players team
if (team) and getTeamFromName(teamthen
      setPlayerTeam(sourcegetTeamFromName(team)) -- sets players team
     end
end
addEventHandler("onPlayerLogin",root,setTeam) -- sets players team on login
 
function save()
 local team getPlayerTeam(source) -- Gets the players team
local account getPlayerAccount(source)
if (team) and not isGuestAccount(accountthen -- Checks to see if the player is a guest or not
setAccountData(account"team"getTeamName(team)) --saves team
 end
    end
addEventHandler("onPlayerQuit"getRootElement(), save) -- saves team on quit


Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-26, 17:47


Odważny

Początki LUA :P






Wiek: 25
Na forum: 3739 dni
Posty: 140
Nick w MP: ReseT_

Piwa: 166

Respekt: 50

AteX, Nie ma ?adnych DB3, gdyby by?y to bym napisa?...

[ Dodano: 2016-03-26, 17:50 ]
AteX, 0% zmian w kodzie. ;-;

[ Dodano: 2016-03-26, 17:51 ]
AteX, Co do zapisu tego to dzia?a, gdy mam wy??czone logowanie to zapisuje mi skina. Co? jest z kodem w logowaniu ;/

Podpis
, pomogłem Ci? Wynagrodź mnie :piwo: :P
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-26, 17:54


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

"Odwa?ny" napisał/a:

AteX, Nie ma ?adnych DB3, gdyby by?y to bym napisa?...

[ Dodano: 2016-03-26, 17:50 ]
AteX, 0% zmian w kodzie. ;-;

[ Dodano: 2016-03-26, 17:51 ]
AteX, Co do zapisu tego to dzia?a, gdy mam wy??czone logowanie to zapisuje mi skina. Co? jest z kodem w logowaniu ;/


Usun??em z tego kodu tostring, bo robi?o z cyfry tekst. Co do logowania usu? to:
function playerLoginthePlayer )
end
addEventHandler("onPlayerLogin"getRootElement(), playerLogin)

function playerJointhePlayer )
spawnPlayer(thePlayer,0,0,0,0)
end
addEventHandler("onPlayerJoin"getRootElement(), playerLogin)

Nic wi?cej nie mo?e tego powoda?.

Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-26, 17:58


Odważny

Początki LUA :P






Wiek: 25
Na forum: 3739 dni
Posty: 140
Nick w MP: ReseT_

Piwa: 166

Respekt: 50

AteX, nadal nie dzia?a -,-

Podpis
, pomogłem Ci? Wynagrodź mnie :piwo: :P
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-26, 18:19


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Wydaje mi si?, ?e Atex si? pomyli poniewa?
spawnPlayer(thePlayer,0,0,0,0)
to nie tylko rotacja.


Wygl?da to tak
spawnPlayer(thePlayer,RotX,RotY,RotZ,ID Skina)


By? mo?e si? myle, nie wiem.

Ale spr?buj tak
spawnPlayer(thePlayer,0,0,0)


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-26, 18:22


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

"marcin778" napisał/a:

Wydaje mi si?, ?e Atex si? pomyli poniewa?
spawnPlayer(thePlayer,0,0,0,0)
to nie tylko rotacja.


Wygl?da to tak
spawnPlayer(thePlayer,RotX,RotY,RotZ,ID Skina)


By? mo?e si? myle, nie wiem.

Ale spr?buj tak
spawnPlayer(thePlayer,0,0,0)


Nie wprowadzaj w b??d... Na wiki wygl?da to tak:
bool spawnPlayer player thePlayerfloat xfloat yfloat z, [ int rotation 0int skinID 0int interior 0int dimension 0team theTeam nil ] )


Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-26, 18:25


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Tak, ale tam niema a? tylu argument?w, jest tylko ich 4. Przy czym trzy pierwsze
0 to rotacja x,y,z a 4 argument wygl?da na skin. Sam przetestowa?em ten kod i r?wnie? za ka?dym logowaniem pomimo zapisu skin?w zmienia skin na 0

[ Dodano: 2016-03-26, 18:26 ]
Zauwa?, ?e pozosta?e parametry zamieszczone s? w naiwasach kwadratowych.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-26, 18:26


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

"marcin778" napisał/a:

Tak, ale tam niema a? tylu argument?w, jest tylko ich 4. Przy czym trzy pierwsze
0 to rotacja x,y,z a 4 argument wygl?da na skin. Sam przetestowa?em ten kod i r?wnie? za ka?dym logowaniem pomimo zapisu skin?w zmienia skin na 0


1 argument to gracz, trzy kolejne pozycja x,y,z, a 5 rotacja. :/ Nawiasy kwadratowe oznaczaj? opcjonalne argumenty, a nie obowi?zkowe.

Ale mimo wszystko m?wi?em, aby usun?? ca?? t? funkcj? i dalej mu nie zmienia skina.

Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Ostatnio zmieniony przez AteX 2016-03-26, 18:27, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-26, 18:26


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

int skinID 0


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-26, 18:28


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

"marcin778" napisał/a:

int skinID 0


Tak, to jest 6 argument. Prosz? ci?... przeczytaj wiki 10 razy zanim co? napiszesz.

Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-26, 18:33


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Nie musz? jej czyta?. Przyjrzyj si?, spawnPlayer, 0, 0, 0, 0) ostatnie to 5 argument, a 5 argumentem jest Rotacja :o , faktycznie. Sory za wprowadzenie w b??d jak i ciebie tak i autora. Ale autorem tego panelu logowania jest monio. http://gtao.pl/<font-c...bor-vt97644.htm

I owego b??du nie usun??.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-26, 18:55


Odważny

Początki LUA :P






Wiek: 25
Na forum: 3739 dni
Posty: 140
Nick w MP: ReseT_

Piwa: 166

Respekt: 50

AteX, marcin778, Z tego co si? rozpisali?cie to co mam wko?cu usun??? :D

Podpis
, pomogłem Ci? Wynagrodź mnie :piwo: :P
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-27, 12:02


Emm

***** ***






Wiek: 32
Na forum: 3880 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6162

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
To co kaza? AteX, czyli spr?buj usun?? to:
function playerLoginthePlayer )
end
addEventHandler("onPlayerLogin"getRootElement(), playerLogin)

function playerJointhePlayer )
spawnPlayer(thePlayer,0,0,0,0)
end
addEventHandler("onPlayerJoin"getRootElement(), playerLogin)


Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-27, 12:43


Odważny

Początki LUA :P






Wiek: 25
Na forum: 3739 dni
Posty: 140
Nick w MP: ReseT_

Piwa: 166

Respekt: 50

Emm, Usuni?te. Logowanie nie reaguje na to.

Podpis
, pomogłem Ci? Wynagrodź mnie :piwo: :P
Postaw piwo autorowi tego posta
 

 
Tagi: jak :: usunąć :: linijkę?
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Jak usunąć linijkę? 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