Author Topic: i've got some questions  (Read 3771 times)

0 Members and 1 Guest are viewing this topic.

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
i've got some questions
« 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.
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline cooz

  • Soldier
  • **
  • Posts: 187
  • BANNED
Re: i've got some questions
« Reply #1 on: January 15, 2007, 03:23:10 pm »
1.
Code: [Select]
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
Dead man! Dead man walking! We got a dead man walking here! Banned man crawling more like

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: i've got some questions
« Reply #2 on: January 15, 2007, 03:42:38 pm »
thanks.

i want to add a 4 digit random password when i type !randompass
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline cooz

  • Soldier
  • **
  • Posts: 187
  • BANNED
Re: i've got some questions
« Reply #3 on: January 15, 2007, 04:01:24 pm »
server pass, not admin pass, right?

yeah probably could be done in v2.6 ;)
Dead man! Dead man walking! We got a dead man walking here! Banned man crawling more like

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: i've got some questions
« Reply #4 on: January 15, 2007, 04:21:03 pm »
i've got one question more, if a player swear,like typing  "fu*k" word how can i make him banned automatickly

Code: [Select]
procedure OnPlayerSpeak(Name,Text: string);
begin
if (Text=*fu.k*) then
Command('/ban '+inttostr(NameToID(name)));
end;

it doesnt work.. :(
« Last Edit: January 15, 2007, 04:25:35 pm by xmRipper »
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline cooz

  • Soldier
  • **
  • Posts: 187
  • BANNED
Re: i've got some questions
« Reply #5 on: January 15, 2007, 04:32:00 pm »
try:
if(Text='fu.k') then

' instead of *
oh and you can always ask me on pm questions like that ;)
Dead man! Dead man walking! We got a dead man walking here! Banned man crawling more like

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: i've got some questions
« Reply #6 on: January 15, 2007, 05:14:51 pm »
if i use if(Text='fu.k') in sentence server doesn't understand it. nothing?
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline CarlHamilton

  • Major(1)
  • Posts: 29
Re: i've got some questions
« Reply #7 on: January 16, 2007, 08:45:19 am »
This' what you're trying to do?
Code: [Select]
procedure OnPlayerSpeak(Name,Text: string);
begin
    if (maskcheck(text, '*insert naughty word here*')) then
        command('/ban '+inttostr(nametoid(name)));
end;

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: i've got some questions
« Reply #8 on: January 16, 2007, 11:29:00 am »
yea! its works, thanks ;)

Date Posted: January 16, 2007, 10:54:29 AM
cooz,

Code: [Select]
procedure OnJoinGame(IP, Nickname: string;Team: byte)
begin
  if nickname = 'Major' then kickplayer(nametoid(Nickname));
end;

it doesnt work :S
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline cooz

  • Soldier
  • **
  • Posts: 187
  • BANNED
Re: i've got some questions
« Reply #9 on: January 16, 2007, 12:09:12 pm »
uhh, sorry

this should be good
Code: [Select]
procedure OnJoinTeam(IP, Nickname: string;Team: byte);
begin
if nickname = 'Major' then kickplayer(nametoid(Nickname));
end;
Dead man! Dead man walking! We got a dead man walking here! Banned man crawling more like

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: i've got some questions
« Reply #10 on: January 16, 2007, 02:36:18 pm »
ok. thanks cooz :)
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: i've got some questions
« Reply #11 on: January 16, 2007, 02:53:51 pm »
one question more ;D

Code: [Select]
procedure OnPlayerSpeak(Name,Text: string;ID: integer);
begin
  if (maskcheck(text, '*fu.k*')) then
  WriteLnFile('log.txt',IDToName(ID)+' = '+text);
end;

what is wrong ?  :-\
« Last Edit: January 16, 2007, 02:59:15 pm by xmRipper »
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline CarlHamilton

  • Major(1)
  • Posts: 29
Re: i've got some questions
« Reply #12 on: January 16, 2007, 03:02:35 pm »
Too many a ' might become a problem.
Maybe this'll work better?
Code: [Select]
procedure OnPlayerSpeak(Name,Text: string;ID: integer);
begin
    if (maskcheck(text, '*dumdumdum*')) then
        WriteLnFile('log.txt',IDToName(ID)+' = '+text);
end;

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: i've got some questions
« Reply #13 on: January 16, 2007, 03:15:40 pm »
Too many a ' might become a problem.
Maybe this'll work better?
Code: [Select]
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 :(

Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline cooz

  • Soldier
  • **
  • Posts: 187
  • BANNED
Re: i've got some questions
« Reply #14 on: January 16, 2007, 03:19:57 pm »
uhh, where did you boys find ID in onplayerspeak() arg? :)

hehe, now i understand what those stars mean at first place

Code: [Select]
procedure OnPlayerSpeak(Name,Text: string);
begin
  if(ContainsString(Text,'fu.k')=true) then
   WriteLnFile('log.txt',Name+' = '+text);
end;
Dead man! Dead man walking! We got a dead man walking here! Banned man crawling more like

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: i've got some questions
« Reply #15 on: January 16, 2007, 04:04:21 pm »
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?
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline cooz

  • Soldier
  • **
  • Posts: 187
  • BANNED
Re: i've got some questions
« Reply #16 on: January 16, 2007, 05:18:29 pm »
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
Dead man! Dead man walking! We got a dead man walking here! Banned man crawling more like