Forum

> > CS2D > Scripts > LUA Question
Forums overviewCS2D overview Scripts overviewLog in to reply

English LUA Question

4 replies
To the start Previous 1 Next To the start

old LUA Question

dizziness
User Off Offline

Quote
Hello, guys can you help me with this problem?

I already have scirpt and i already update it but some admin are asking why not make full info of the player, I mean my server is using database ("sys/lua/database/..usgn..") So i want show full info of the player database here the example of what i mean (Already added)

This player internet protocol
This player name
This player unreal software gaming network

But i want make like this

This player internet protocol
This player name
This player unreal software gaming network
This player database 1e+025 2 0 1 1 1 1 1 1 1 1 1

---------------------------------

player usgn 36500 databse is 1e+025 2 0 1 1 1 1 1 1 1 1 1
So when admin write !info ..idnumberplayer..
It showing the info

This player internet protocol 000.000.00.000
This player name 0
This player unreal software gaming network 0
This player database 0 0 0 0 0 0 0 0 0 0 0 0

0 = the info (So can you help me now?)

Here the info of my files:

sys/lua/database/..usgn..
1
2
3
4
5
6
7
8
9
elseif cmd == "!info" then
		    local pl = tonumber(p[2])
			if pl ~= nil then
				if player(pl,"exists") then
				    rp_msg2(id,"000255000","This player internet protocol "..player(pl,"ip"))
				    rp_msg2(id,"000255000","This player name "..player(pl,"name"))
					rp_msg2(id,"000255000","This player unreal software gaming network "..player(pl,"usgn"))
				end
			end

old Re: LUA Question

Yasday
User Off Offline

Quote
1
2
3
4
local f = file("sys/lua/database" .. usgn, "r")
local r = f:read("*a")
f:close()
print("Players database: " .. r)
Something like this?

old Re: LUA Question

kalis
User Off Offline

Quote
@Banaan
this is money,license,,add ons , VIP ?
i think that!

old Re: LUA Question

dizziness
User Off Offline

Quote
user kalis has written
@Banaan
this is money,license,,add ons , VIP ?
i think that!


Ya you are correct

@Yasday thank you

but how to write it? I think it still wrong did like this?

1
2
3
4
5
6
7
8
9
10
11
12
13
elseif cmd == "!info" then
		    local pl = tonumber(p[2])
			local f = file("sys/lua/database" .. usgn, "r")
local r = f:read("*a")
f:close()
print("Players database: " .. r)
			if pl ~= nil then
				if player(pl,"exists") then
				    rp_msg2(id,"000255000","This player internet protocol "..player(pl,"ip"))
				    rp_msg2(id,"000255000","This player name "..player(pl,"name"))
					rp_msg2(id,"000255000","This player unreal software gaming network "..player(pl,"usgn"))
				end
			end
edited 1×, last 16.05.11 10:11:51 am
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview