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

Wysłany: 2014-12-24, 14:32


kacperh2000







Wiek: 38
Na forum: 4190 dni
Posty: 1



Respekt: 50

kolumna = exports.scoreboard:scoreboardAddColumn("ID")
priorytet = exports.scoreboard:scoreboardSetColumnPriority("ID", 1, getRootElement())
local id = 0

function onJoin()
for w_g, gracz in ipairs(getElementsByType("player")) do
ids = getElementData(gracz, "ID")
end
if (setElementData(source,"ID", id+1) == true ) and not (ids == id+1) then
id = id+1
else
end
end
addEventHandler("onPlayerJoin", getRootElement(), onJoin)

function onQuit()
id1 = getElementData(source, "ID")
if id1 > id then
elseif id <= 1 then
id = 0
else
id = id1 - 1
end
end
addEventHandler("onPlayerQuit", getRootElement(), onQuit)

function ID()
for w_g, gracz in ipairs(getElementsByType("player")) do
ids = getElementData(gracz, "ID")
outputChatBox("ID"..getPlayerName(gracz)..": "..ids, source)
end
end
addCommandHandler("id", ID)


Potrzeba mi ?eby skrypt ten zapisywa? id na zawsze do jednego gracza

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-25, 01:11


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4427 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

U?yj setAccountData

[ Dodano: 2014-12-25, 01:12 ]
kacperh2000, PS. Z?y dzia?.

Postaw piwo autorowi tego posta
 

 
Tagi: systam
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » id systam 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