Forum

> > CS2D > Scripts > Password change error!
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Password change error!

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Password change error!

phalenkO
User Off Offline

Zitieren
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
1× editiert, zuletzt 19.06.18 15:18:35

alt try this !

KingShadow
User Off Offline

Zitieren
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

alt Re: Password change error!

Baloon
GAME BANNED Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht