Official Soldat Forums
Server Talk => Scripting Discussions and Help => Topic started by: xmRipper on January 15, 2007, 02:53:07 pm
-
- if player name is major, how i kick him? (pascal script)
- How i get random pass. When i say !randompass ? (pascal script)
- in dedicated server 2.6.0 in deathmatch mode is there will be a command to DM team?
(sorry bad english)
Thanks.
-
1.
procedure OnJoinGame(IP, Nickname: string;Team: byte)
begin
if nickname = 'Major' then kickplayer(nametoid(Nickname));
end;
2.
you can't in current version, and i don't quite understand what you're asking for
3.
i wish it'll be there
-
thanks.
i want to add a 4 digit random password when i type !randompass
-
server pass, not admin pass, right?
yeah probably could be done in v2.6 ;)
-
i've got one question more, if a player swear,like typing "fu*k" word how can i make him banned automatickly
procedure OnPlayerSpeak(Name,Text: string);
begin
if (Text=*fu.k*) then
Command('/ban '+inttostr(NameToID(name)));
end;
it doesnt work.. :(
-
try:
if(Text='fu.k') then
' instead of *
oh and you can always ask me on pm questions like that ;)
-
if i use if(Text='fu.k') in sentence server doesn't understand it. nothing?
-
This' what you're trying to do?
procedure OnPlayerSpeak(Name,Text: string);
begin
if (maskcheck(text, '*insert naughty word here*')) then
command('/ban '+inttostr(nametoid(name)));
end;
-
yea! its works, thanks ;)
Date Posted: January 16, 2007, 10:54:29 AM
cooz,
procedure OnJoinGame(IP, Nickname: string;Team: byte)
begin
if nickname = 'Major' then kickplayer(nametoid(Nickname));
end;
it doesnt work :S
-
uhh, sorry
this should be good
procedure OnJoinTeam(IP, Nickname: string;Team: byte);
begin
if nickname = 'Major' then kickplayer(nametoid(Nickname));
end;
-
ok. thanks cooz :)
-
one question more ;D
procedure OnPlayerSpeak(Name,Text: string;ID: integer);
begin
if (maskcheck(text, '*fu.k*')) then
WriteLnFile('log.txt',IDToName(ID)+' = '+text);
end;
what is wrong ? :-\
(http://img128.imageshack.us/img128/5167/errev4.png)
-
Too many a ' might become a problem.
Maybe this'll work better?
procedure OnPlayerSpeak(Name,Text: string;ID: integer);
begin
if (maskcheck(text, '*dumdumdum*')) then
WriteLnFile('log.txt',IDToName(ID)+' = '+text);
end;
-
Too many a ' might become a problem.
Maybe this'll work better?
procedure OnPlayerSpeak(Name,Text: string;ID: integer);
begin
if (maskcheck(text, '*dumdumdum*')) then
WriteLnFile('log.txt',IDToName(ID)+' = '+text);
end;
this didn't work also :(
(http://img128.imageshack.us/img128/5167/errev4.png)
-
uhh, where did you boys find ID in onplayerspeak() arg? :)
hehe, now i understand what those stars mean at first place
procedure OnPlayerSpeak(Name,Text: string);
begin
if(ContainsString(Text,'fu.k')=true) then
WriteLnFile('log.txt',Name+' = '+text);
end;
-
lol ;D ;D ;D ;D ;D
thanks again ;D
Date Posted: January 16, 2007, 03:36:49 PM
How can I active the new scprits when I do some changes in scripts without closing the servers?
-
use /recompile commad, it'll restart server though
oh and maybe with next question about scripts
you could go: irc.quakenet.org,
you can find me there at eg. #soldat.devs channel
cause this topic looks more like chat than forum :-X