Forum

> > CS2D > Scripts > View
Forums overviewCS2D overview Scripts overviewLog in to reply

English View

8 replies
To the start Previous 1 Next To the start

old View

GooDCaT
User Off Offline

Quote
1
2
3
4
say : !view <ID>
"Player Name" The IP is : <IP>
"Player Name" The USGN Name is <USGN NAME >
"Player Name" The USGN ID is <USGN ID>


please help me

old Re: View

Apache uwu
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("say","_say")

function _say(id,message)
	if string.sub(message,1,6)=="!view " then
		playerID=tonumber(string.sub(message,7))
		if playerID~=nil and player(playerID,"exists") then
			msg2(id,"The IP is "..player(playerID,"ip")..".")
			--msg2(id,"The USGN Name is "..tableOfUsgn[player(playerID,"usgn")]..".")
			msg2(id,"The USGN ID is "..player(playerID,"usgn")..".")
		else
			msg2(id,string.char(169).."255000000Invaild player id.")
		end
		return 1
	end
end

You need to get a table of all the usgn players in this format:

1
2
3
4
5
tableOfUsgn={
	1="DC",
	2="etc",
	3="etc",
}

Then UN-comment the second message.

old buut

Scripterz
User Off Offline

Quote
I have a brain, this brain doesnt have lua script experience enough, to guess what table should be created

old Re: View

Apache uwu
User Off Offline

Quote
It's common sense, regardless if you know lua or not.

old Re: View

Scripterz
User Off Offline

Quote
forgive my lack of common sense.
how does the table should be ?

old Re: View

Apache uwu
User Off Offline

Quote
That is a table of usgn names, that what I was getting at.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview