Forum

> > CS2D > Scripts > Password change error!
Forums overviewCS2D overview Scripts overviewLog in to reply

English Password change error!

8 replies
To the start Previous 1 Next To the start

old Password change error!

phalenkO
User Off Offline

Quote
When I change the password, only 2 words are a password, why?

>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pha = {142925}

addhook("say","-pw")
function -pw(id,txt)
if player(id,"usgn") == pha[id] then 
if string.sub(txt, 1, 3) == "!pw" then 
local sifre = string.sub(txt, 5, 6) 
parse("sv_password "..sifre)
msg("\169000255111[SERVER] \169255255255"..player(id,"name").." changed is Server Password!")
msg2(id,"\169255255255Now Server Password: "..game("sv_password").." ")
return 1 
end
end
end
edited 1×, last 19.06.18 03:18:35 pm

old try this !

KingShadow
User Off Offline

Quote
i fixed it for you and it works you have to put one number after your txt sub command eg: pw = txt:sub(4) to make after that command txt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
pha = {139295}

addhook("say","_pw")
function _pw(id,txt)
if player(id,"usgn") == pha[id] then 
if txt:sub(1,3) == "!pw" then 
pw = txt:sub(4)
parse("sv_password "..pw)
msg("\169000255111[SERVER] \169255255255"..player(id,"name").." changed is Server Password!")
msg2(id,"\169255255255Now Server Password: "..game("sv_password").." ")
return 1 
end
end
end

old Re: Password change error!

Baloon
GAME BANNED Off Offline

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

addhook("say","_pw")
function _pw(id,txt)
if player(id,"usgn") == pha[1] then 
if string.sub(txt, 1, 3) == "!pw" then 
local sifre = string.sub(txt, 5) 
parse("sv_password "..tostring(sifre))
msg("\169000255111[SERVER] \169255255255"..player(id,"name").." changed is Server Password!")
msg2(id,"\169255255255Now Server Password: "..game("sv_password").." ")
return 1 
end
end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview