Forum

> > CS2D > Scripts > Lua need for ADMIN script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua need for ADMIN script

3 replies
To the start Previous 1 Next To the start

old Lua need for ADMIN script

Spook MQ Hacker
BANNED Off Offline

Quote
how to make when you say in the game "!lol" then your deaths and score are back to 0 zero my script works but the score set to 2999 and can someone make me a script the if you say "!cvip [Id]" then if he/she is now a VIP then the usgn will be post in the LUA script..

by the way we in real life?

old Re: Lua need for ADMIN script

EngiN33R
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
vips={}

addhook("say","saycommands",317)
function saycommands(id,t)
	if t=="!lol" then
		parse("setscore "..id.." 0")
		parse("setdeaths "..id.." 0")
	end
	if t:sub(1,5)=="!cvip" then
		local iid=tonumber(t:sub(7))
		table.insert(vips,player(iid,"usgn"))
		msg2(id,player(iid,"name").." promoted to VIP.")
		msg2(iid,"You have been promoted to VIP!")
	end
end

The second part just inserts the ID in the cvip command into a vips table, more stuff will need more code.

And no, we're in the Matrix.

old Re: Lua need for ADMIN script

thelordfather
User Off Offline

Quote
you can add vip say man!!

1
2
3
4
5
6
7
8
9
10
11
viplist = {your usgn here}

addhook("say","vipsay")
function vipsay(id,txt)
for _, usgn in ipairs(viplist) do
if player(id,'usgn') == usgn then
     msg("©000000255"..player(id,"name").." [VIP]: "..txt)
return 1
end
end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview