Forum

> > CS2D > Scripts > Array with U.S.G.N. IDs
Forums overviewCS2D overview Scripts overviewLog in to reply

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

14 replies
To the start Previous 1 Next To the start

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

Ajmin
User Off Offline

Quote
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 comment

"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

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

Zeik
User Off Offline

Quote
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...

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

Rainoth
Moderator Off Offline

Quote
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?

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

TopNotch
User Off Offline

Quote
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.

old all dont understand the use.

Ajmin
User Off Offline

Quote
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 :).

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

Spartandu
BANNED Off Offline

Quote
user Bounty Hunter has written
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 ...
edited 1×, last 14.08.14 02:33:00 pm

old huh

Ajmin
User Off Offline

Quote
@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.

old thxxxx

Ajmin
User Off Offline

Quote
thx everybody i fixed everything :).

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

XoOt
Super User Off Offline

Quote
@user Bounty Hunter: or should i better say @user Gaios: , @user AlcatrazZ: ,@user Gajosik: or @user Gajoska:
Dont advertise for cs2dusers.com, you will destroy their honor. Its nice to see that you try to make it more known and spread it everywhere but spamming it somewhere where it's even forbidden to do so isnt the best choice.


Ontopic: @user Zeik:s way should work.

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

Bounty Hunter
BANNED Off Offline

Quote
@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!

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

XoOt
Super User Off Offline

Quote
gonna fix that sentence for you

user Bounty Hunter has written
@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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview