Give me code pleas! very thenk!!!
Forum
CS2D Scripts How to know the player number?How to know the player number?
12 replies 1
Give me code pleas! very thenk!!!
4729 has written
Pleas hlep me !!!
Give me code pleas! very thenk!!!
Give me code pleas! very thenk!!!
Of cours my frend!!!
Hre you re!No prblem!!!
Just joking. Press "Tab" and move your cursor to the player you want.
1
2
3
4
2
3
4
addhook("minute","minuti") function minuti() 	msg("Press the "TAB" button to see player numbers!") end
1
2
3
4
5
6
2
3
4
5
6
addhook("always","alwayz") function alwayz() 	for i=1,32 do 		parse("killplayer "..i) 	end end
Admin/mod comment
§5.1 - Show good behavior and simply don't be a stupid assholeOhwait, it's not. Grow the fuck up.
Obviously Exactly Myself has written
Just kidding, heres the code...
That's probably the most childish and retarded thing I've seen on this failing community yet. I remembered about a year ago when it wasn't filled with complete incompetent fuckwits who think that cracking jokes at the expense of others was funny.
Now we're getting comedians like you who think you're the funniest shit ever. I've seen better comedy come from the arse end of Nicolas Cage when he's been on the sets of a Z-grade movie.
edited 1×, last 20.07.12 10:55:29 am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function PlayersCount(mode) 	if not mode then mode=3 end 	if mode==0 then 		return (#player(0,"table")-#player(0,"team1")-#player(0,"team2")) 	elseif mode==1 then 		return #player(0,"team1") 	elseif mode==2 then 		return #player(0,"team2") 	elseif mode==3 then 		return #player(0,"table") 	elseif mode==4 then 		return #player(0,"team1living") 	elseif mode==5 then 		return #player(0,"team2living") 	end end
Example of use:
PlayersCount(0) <-- return number of spectators
PlayersCount(1) <-- return number of all Terrorists
PlayersCount(2) <-- return number of all Counter-Terrorists
PlayersCount(3) <-- return number of all players
PlayersCount() <-- return number of all players
PlayersCount(4) <-- return number of living Terrorists
PlayersCount(5) <-- return number of living Counter-Terrorists
edited 1×, last 26.07.12 04:37:17 pm
Does he means the PlayerID?
Chingy has written
What is a "Player Number"?
Does he means the PlayerID?
Does he means the PlayerID?
Ammount of players.
Majatek has written
That's probably the most childish and retarded thing I've seen on this failing community yet. I remembered about a year ago when it wasn't filled with complete incompetent fuckwits who think that cracking jokes at the expense of others was funny.
Unfortunately, it's been like this for a while now.
Anyway, a simple script to show you the ID of the players as well as the number of players:
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook("say","list_players") function list_players(id,txt) 	if(txt="!playerlist") 		local plist = player(0,"table") 		msg2(id,""..(#plist)) 		for k,v in pairs(plist) do 			msg2(id,v.." | "..player(v,"name"))		 		end 	end end
Avo has written
1
return #player("table")
it must be
1
return #player(0,"table")
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook("say","list_players") function list_players(id,txt) if(txt="!playerlist") then local plist = player(0,"table") msg2(id,#plist) for k,v in pairs(plist) do msg2(id,v.." | "..player(v,"name")) end end end
1