English Lua need for ADMIN script

3 replies
Goto Page
To the start Previous 1 Next To the start
24.04.12 05:35:50 am
Up
Spook MQ Hacker
BANNED
Offline Off
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?
24.04.12 01:21:07 pm
Up
EngiN33R
Moderator
Offline Off
Code:
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.
I code, therefore I exist. | Visit my blog for Lua tips and other interesting info
25.04.12 06:27:49 am
Up
Spook MQ Hacker
BANNED
Offline Off
Nice EngiN33R
25.04.12 01:35:13 pm
Up
thelordfather
User
Offline Off
you can add vip say man!!

Code:
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