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

Wysłany: 2013-01-21, 18:03


Vike4562

LUA <3






Wiek: 28
Na forum: 4937 dni
Posty: 144
Nick w MP: Vike4562

Piwa: 32

Respekt: 61

Witam

Mam problem z 1 rzecza , problem tkwi w tym ze jak save jest na Consoli w ( Local ) to wszystko dziala dobrze , a jak dam go na Hosting serwera to nie zapisuje nic

o co chodzi ?

Prosze o pomoc..

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-21, 20:43


Oski

LUA Scripter






Wiek: 30
Na forum: 5246 dni
Posty: 428
Nick w MP: Oski

Piwa: 56

Respekt: 75,1

Wr??kami nie jeste?my poka? kod.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-22, 11:54


Pantera







Wiek: 27
Na forum: 5213 dni
Posty: 52
Nick w MP: Michu

Piwa: 8

Respekt: 70

Oski po co kod wyaznie napisal ze jak ma serwer na windowsie to sie dane zapisuja ale jak linux to nie

PS.Chodzi mu o accountData

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-22, 16:54


Oski

LUA Scripter






Wiek: 30
Na forum: 5246 dni
Posty: 428
Nick w MP: Oski

Piwa: 56

Respekt: 75,1

Pantera, zawsze zaczynamy od zoabczenia kodu. I dlaczego twierdzisz ?e host jaki on posiada jest na linuxsie i jego komputer jest na windowsie.

To s? tylko twoje przypuszczenia a jak jest na 100% dowiesz si? po jego odpowiedzi i zobaczeniu kodu.
Skad wiesz czy skrypt nie zawiera jakiego? modu?u ? NP SQL ?
Nie napisal ze jest to accountdata

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-22, 17:36


Vike4562

LUA <3






Wiek: 28
Na forum: 4937 dni
Posty: 144
Nick w MP: Vike4562

Piwa: 32

Respekt: 61

Cytat:

function onPlayerQuit ( )
if not isGuestAccount ( playeraccount ) then
if ( playeraccount ) then
local playeraccount = getPlayerAccount ( source )
local Score = getElementData ( source, "Score" )
if ( Score ) then
setAccountData (playeraccount, "Score", Score )
setAccountData (playeraccount, "s.HandMoney", getPlayerMoney ( source ))
setAccountData (playeraccount, "s.health", getElementHealth (source))
setAccountData (playeraccount, "s.armor", getPedArmor (source))
setAccountData (playeraccount, "s.skin", tostring (getPedSkin (source)))
setAccountData (playeraccount, "s.int", getElementInterior (source))
setAccountData (playeraccount, "s.dim", getElementDimension (source))
setAccountData (playeraccount, "s.rot", getPlayerRotation (source))
setAccountData (playeraccount, "s.weap0", getPedWeapon ( source, 0 ))
setAccountData (playeraccount, "s.weap1", getPedWeapon ( source, 1 ))
setAccountData (playeraccount, "s.weap2", getPedWeapon ( source, 2 ))
setAccountData (playeraccount, "s.ammo2", getPedTotalAmmo ( source, 2 ))
setAccountData (playeraccount, "s.weap3", getPedWeapon ( source, 3 ))
setAccountData (playeraccount, "s.ammo3", getPedTotalAmmo ( source, 3 ))
setAccountData (playeraccount, "s.weap4", getPedWeapon ( source, 4 ))
setAccountData (playeraccount, "s.ammo4", getPedTotalAmmo ( source, 4 ))
setAccountData (playeraccount, "s.weap5", getPedWeapon ( source, 5 ))
setAccountData (playeraccount, "s.ammo5", getPedTotalAmmo ( source, 5 ))
setAccountData (playeraccount, "s.weap6", getPedWeapon ( source, 6 ))
setAccountData (playeraccount, "s.ammo6", getPedTotalAmmo ( source, 6 ))
setAccountData (playeraccount, "s.weap7", getPedWeapon ( source, 7 ))
setAccountData (playeraccount, "s.ammo7", getPedTotalAmmo ( source, 7 ))
setAccountData (playeraccount, "s.weap8", getPedWeapon ( source, 8 ))
setAccountData (playeraccount, "s.ammo8", getPedTotalAmmo ( source, 8 ))
setAccountData (playeraccount, "s.weap9", getPedWeapon ( source, 9 ))
setAccountData (playeraccount, "s.ammo9", getPedTotalAmmo ( source, 9 ))
setAccountData (playeraccount, "s.weap10", getPedWeapon ( source, 10 ))
setAccountData (playeraccount, "s.weap11", getPedWeapon ( source, 11 ))
setAccountData (playeraccount, "s.weap12", getPedWeapon ( source, 12 ))
end
end
end
end
addEventHandler ( "onPlayerQuit", getRootElement(), onPlayerQuit )




Cytat:

function spawnn()
local playeraccount = getPlayerAccount ( source )
if ( playeraccount ) then
local playermoney = getAccountData ( playeraccount, "s.HandMoney" )
if ( playermoney ) then
setPlayerMoney ( source, playermoney )
end
local Score = getAccountData(playeraccount, "Score")
local zycie = getAccountData(playeraccount, "s.health")
local armor = getAccountData(playeraccount, "s.armor")
local skin = getAccountData(playeraccount, "s.skin")
local weap0 = getAccountData(playeraccount, "s.weap0")
local weap1 = getAccountData(playeraccount, "s.weap1")
local weap2 = getAccountData(playeraccount, "s.weap2")
local ammo2 = getAccountData(playeraccount, "s.ammo2")
local weap3 = getAccountData(playeraccount, "s.weap3")
local ammo3 = getAccountData(playeraccount, "s.ammo3")
local weap4 = getAccountData(playeraccount, "s.weap4")
local ammo4 = getAccountData(playeraccount, "s.ammo4")
local weap5 = getAccountData(playeraccount, "s.weap5")
local ammo5 = getAccountData(playeraccount, "s.ammo5")
local weap6 = getAccountData(playeraccount, "s.weap6")
local ammo6 = getAccountData(playeraccount, "s.ammo6")
local weap7 = getAccountData(playeraccount, "s.weap7")
local ammo7 = getAccountData(playeraccount, "s.ammo7")
local weap8 = getAccountData(playeraccount, "s.weap8")
local ammo8 = getAccountData(playeraccount, "s.ammo8")
local weap9 = getAccountData(playeraccount, "s.weap9")
local ammo9 = getAccountData(playeraccount, "s.ammo9")
local weap10 = getAccountData(playeraccount, "s.weap10")
local weap11 = getAccountData(playeraccount, "s.weap11")
local weap12 = getAccountData(playeraccount, "s.weap12")
setTimer ( giveWeapon , 6000, 1, source, weap0, 1 )
setTimer ( giveWeapon , 6000, 1, source, weap1, 1 )
setTimer ( giveWeapon , 6000, 1, source, weap2, ammo2 )
setTimer ( giveWeapon , 6000, 1, source, weap3, ammo3 )
setTimer ( giveWeapon , 6000, 1, source, weap4, ammo4 )
setTimer ( giveWeapon , 6000, 1, source, weap5, ammo5 )
setTimer ( giveWeapon , 6000, 1, source, weap6, ammo6 )
setTimer ( giveWeapon , 6000, 1, source, weap7, ammo7 )
setTimer ( giveWeapon , 6000, 1, source, weap8, ammo8 )
setTimer ( giveWeapon , 6000, 1, source, weap9, ammo9 )
setTimer ( giveWeapon , 6000, 1, source, weap10, 1 )
setTimer ( giveWeapon , 6000, 1, source, weap11, 1 )
setTimer ( giveWeapon , 6000, 1, source, weap12, 1 )
setTimer ( setElementHealth , 6000, 1, source, zycie)
setTimer ( setPedArmor , 6000, 1, source, armor)
setTimer ( setElementData, 6000, 1, source, "Score", tonumber(Score))



wczesniej nie podalem setAccountData bo nie wiedzialem czy jest potrzebne :p

jest tu jakis blad przez kt?ry moglo by dzialac na Consoli , a nie dzialac na Hostingu ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-01-22, 20:55


Oski

LUA Scripter






Wiek: 30
Na forum: 5246 dni
Posty: 428
Nick w MP: Oski

Piwa: 56

Respekt: 75,1

Czy tw?j server na hostingu na 100% wy??cza si? bezpiecznie.
Dodaj funkcj? pobieraj?c? wszystkich graczy jednocze?nie a p??niej zapisuj?c? dane. Przy u?yciu p?tli ipairs i getElementsByType("player")

Postaw piwo autorowi tego posta
 

 
Tagi: save
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