Forum

> > CS2D > Scripts > Array with U.S.G.N. IDs
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Array with U.S.G.N. IDs

14 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Array with U.S.G.N. IDs

Ajmin
User Off Offline

Zitieren
i have a small error in my lvl script.
so i found a script/idea which can fix it but i cant manage to make the lua according to my idea .
its a simple thought.

i need to set a player's usgn to 0 when player joins the server and just after a second i need to set back his usgn.
or like i need to set usgn to 0 while joining and need to make it back while selecting team.

Someone help me plse :(.

Maybe its not possible to set the the real usgn but its possible to add usgn to an array and while selecting team we just can make his usgn=(player,id usgn).
i tried to make it but error it always sets player usgn to 0 its doesnt set his/her usgn back.
(that lua is taken from citylife and also that lua works with citylife i think there will be some problem with my edit).

Admin/Mod Kommentar

"Error with :" is a bad title. It is not related to the actual thread at all! You thread isn't even about any error! Please use better titles! Fixed! /DC

alt Re: Array with U.S.G.N. IDs

Zeik
User Off Offline

Zitieren
You can't change user's USGN.

Instead you can initialize a table with 32 values set to 0 and after a second set the table values to the players' USGNs.

I can't find any use to this anyway...

alt Re: Array with U.S.G.N. IDs

Rainoth
Moderator Off Offline

Zitieren
Do what user Zeik suggested, it's your only option.

@user Bounty Hunter: If I see you advertise again, I'll have to ban you for a longer time amount. Just cause you got some special rights on a site does not mean you go everywhere advertising it. There's a thread for it and it alone is enough.

Free iPad! Just complete this survey and you get it.
Sounds familiar?

alt Re: Array with U.S.G.N. IDs

TopNotch
User Off Offline

Zitieren
Although I don't see any use in this, you should try what user Zeik said.
@user Bounty Hunter: Don't spam, it's pointless and stupid.
@user Rainoth: We don't give any special rights to people like user Bounty Hunter anyway.
Yeah, really reminds me at the fake iPad surveys.
EDIT: Well he does have some special rights actually, banned on cs2dusers, nothing positive anyway.

alt all dont understand the use.

Ajmin
User Off Offline

Zitieren
i will explain.
u know what is half-join?
player will cancell joining while on server transfer (downloading files).
it wont trigger the join hook.
so players data will not be loaded.
but if they leave while downloading it will trigger the leave hook.
so players lvl and other data will be saved to 0.
(when leave it saves).
(when join it loads) but half join dont trigger the join hook.
if players usgn id is 0 while joining then players data will not be saved to 0 :).

alt Re: Array with U.S.G.N. IDs

Spartandu
BANNED Off Offline

Zitieren
user Bounty Hunter hat geschrieben
Not tested but should works dude:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
user = {}

function joinHook(id)
	user[id] = {}
	user[id].joined = false
	user[id].usgn = player(id,'usgn')
end

function leaveHook(id)
	user[id] = nil
end

function teamHook(id)
	user[id].joined = true
end

function getUSGN(id)
	if user[id].joined then
		return user[id].usgn
	end
	return 0
end

addhook('join','joinHook',-5)
addhook('leave','leaveHook',-5)
addhook('team','teamHook',-5)
So... use a getUSGN function!!

Thanks to user Bounty Hunter ...
1× editiert, zuletzt 14.08.14 14:33:00

alt huh

Ajmin
User Off Offline

Zitieren
@user Spartandu:
I didnt understand u.
it wont works, as whats the need of leave hook here?
i just need it like this :
only after the function load, save function should be done.
In my script the problem is that before loading function it saves as : user cancel joining while they are strucked in verifying or downloading. cancel will trigger the leave hook.

alt thxxxx

Ajmin
User Off Offline

Zitieren
thx everybody i fixed everything :).

alt Re: Array with U.S.G.N. IDs

Bounty Hunter
BANNED Off Offline

Zitieren
@user XoOt: Do you know why Gajos got so many bans and accounts? His first account was hacked by mafia_man and Yates and they login to his account and done a penis spam. His next bans was for a multi-account. So... the f**ked users, f**ked my live here
user DC forgive me . I love unrealsoftware.de and cs2d anytime!

alt Re: Array with U.S.G.N. IDs

XoOt
Super User Off Offline

Zitieren
gonna fix that sentence for you

user Bounty Hunter hat geschrieben
@user XoOt: Do you know why I got so many bans and accounts? My first account was hacked by mafia_man and Yates and they login to my account and done a penis spam. My next bans was for a multi-account. So... the f**ked users, f**ked my live here
user DC forgive me . I love unrealsoftware.de and cs2d anytime!


multiple accounts at us.de are still a rulebreak as you know.. i hope moderators and especially DC wont tolerate that
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht