Official Soldat Forums

Server Talk => Scripting Discussions and Help => Topic started by: Szewczuq on December 21, 2007, 04:36:27 pm

Title: !nextmap - Chat vote
Post by: Szewczuq on December 21, 2007, 04:36:27 pm
I've got problem. I've got script NextMap chat vote but to vote nextmap i must write /nextmap
Please help because i don't know how change this script !nextmap. Its code:

Code: [Select]
Function OnPlayerCommand(ID: Byte; Text: String): Boolean;
Begin
  If Text = '/nextmap' Then
    StartVoteMap(ID, Nextmap)
End;

When i change script to:

Code: [Select]
Function OnPlayerCommand(ID: Byte; Text: String): Boolean;
Begin
  If Text = '!nextmap' Then
    StartVoteMap(ID, Nextmap)
End;

Then this script is not working :( Please help me.
Title: Re: !nextmap - Chat vote
Post by: Toumaz on December 21, 2007, 04:48:52 pm
OnPlayerSpeak != OnPlayerCommand

Code: [Select]
procedure OnPlayerSpeak(ID: byte; Text: string);
begin
  If Text = '!nextmap' Then
    StartVoteMap(ID, Nextmap)
end;
Title: Re: !nextmap - Chat vote
Post by: Szewczuq on December 21, 2007, 05:36:30 pm
ok thx Toumaz :)

p. d. id like to add to this scirpt 1 vote on 3min? its possible?
Title: Re: !nextmap - Chat vote
Post by: KwS Pall on December 22, 2007, 06:13:36 am
use procedure AppOnIdle...