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 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... The script for you is ready, but to get it you have to register on this forum CS2DUsers.com and write this post again in the appropriate section (Request help), and our team will help you as quickly as possible.
The time of writing the script:
Good luck! Admin/mod comment
Do what Zeik suggested, it's your only option.
@ 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? Although I don't see any use in this, you should try what Zeik said.
@ Bounty Hunter: Don't spam, it's pointless and stupid.
@ Rainoth: We don't give any special rights to people like 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. 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 :). 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 Bounty Hunter ... edited 1×, last 14.08.14 02:33:00 pm
That's why you use team hook. Use common sense. @ Rainoth: I do NOT see another solution, moderator @ 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. @ Ajmin: OMG. Just run the script as the first and instead command player(id,'usgn') use getUSGN(id). thx everybody i fixed everything :). XoOt Super User Offline
@ Bounty Hunter: or should i better say @ Gaios: , @ AlcatrazZ: ,@ Gajosik: or @ 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: @ Zeik:s way should work. @ 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
DC forgive me . I love unrealsoftware.de and cs2d anytime! XoOt Super User Offline
gonna fix that sentence for you
Bounty Hunter has written
@
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
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