Author Topic: Teleport to team  (Read 2323 times)

0 Members and 1 Guest are viewing this topic.

Offline dragus

  • Major(1)
  • Posts: 23
Teleport to team
« on: November 13, 2008, 01:38:07 am »
Who can give to me Teleport to team script in the version 2.6.3
!1-Go to Alpha
!2-Go to Bravo
!5_Go to Specator


Offline UPNPAD

  • Major(1)
  • Posts: 36
Re: Teleport to team
« Reply #1 on: November 13, 2008, 02:48:54 am »
Join any team (0 to 5). I think it /setteam just doesn't do anything if it's a number other than 0-5, so, tell me if this bugs up:
Code: [Select]
procedure OnPlayerSpeak(ID: Byte; Text: string);
begin
if (MaskCheck(Text, '!team *')) then Command('/setteam' + GetPiece(Text, ' ', 1) + ' ' + IntToStr(ID));
end;

If you only want to let them join 1, 2 and 5:
Code: [Select]
procedure OnPlayerSpeak(ID: Byte; Text: string);
begin
if (MaskCheck(Text, '!team *')) and ((GetPiece(Text, ' ', 1) = 1) or (GetPiece(Text, ' ', 1) = 2) or (GetPiece(Text, ' ', 1) = 5)) then Command('/setteam' + GetPiece(Text, ' ', 1) + ' ' + IntToStr(ID));
end;

Usage: !team #

Simplest way I can see to do it, especially if you're going to add other user commands.

If you really only want !1, !2 and !5 then...

Code: [Select]
procedure OnPlayerSpeak(ID: Byte; Text: string);
begin
  if Text = '!1' then
    Command('/setteam1' +  ' ' + IntToStr(ID)
  else if Text = '!2' then
    Command('/setteam2' +  ' ' + IntToStr(ID)
  else if Text = '!5' then
    Command('/setteam5' +  ' ' + IntToStr(ID);
end;

A better place to post this request would have been in the Scripting Discussions and Help forum.
« Last Edit: November 13, 2008, 02:55:24 am by UPNPAD »

Offline dragus

  • Major(1)
  • Posts: 23
Re: Teleport to team
« Reply #2 on: November 13, 2008, 08:55:36 am »
where i must put this?

Offline Norbo

  • Camper
  • ***
  • Posts: 338
Re: Teleport to team
« Reply #3 on: November 13, 2008, 10:40:27 am »
where i must put this?
stick it up your ass maybe

use the damn search option and dont be a stupid ignorant

and stop spamming every script with "where do i put code?"

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: Teleport to team
« Reply #4 on: November 13, 2008, 10:49:06 am »
Damn rite!
Stick it up to ur ass!
Also Known As REIMA


Lol Happles (happy apples)

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: Teleport to team
« Reply #5 on: November 13, 2008, 12:46:46 pm »
where i must put this?
stick it up your ass maybe

use the damn search option and dont be a stupid ignorant

and stop spamming every script with "where do i put code?"

Damn rite!
Stick it up to ur ass!

Both of you warned for flaming.

Offline Farvardin

  • Major(1)
  • Posts: 1
  • Trrr
Re: Teleport to team
« Reply #6 on: November 14, 2008, 10:26:10 am »
Team Change Script by me, there is commands: !1, !2, !5, !red, !blue & !spec

paste this to folder: serverfiles\scripts\
it must work ;)
- 466bytes

@DOWN
mby you upload viruses here, not me... -.-
so use antivirus if you be SCARED  :|
« Last Edit: November 14, 2008, 01:42:57 pm by Farvardin »

Offline Norbo

  • Camper
  • ***
  • Posts: 338
Re: Teleport to team
« Reply #7 on: November 14, 2008, 11:46:16 am »
Team Change Script by me, there is commands: !1, !2, !5, !red, !blue & !spec

paste this to folder: serverfiles\scripts\
it must work ;)
- 466bytes

I wouldnt advise anyone downloading this. A normal script like that should be about 1-3 kbs, and this one is only 466bytes. It might be a virus or smth. I didnt download this so i dont know, and i might be wrong, but there is something suspicious about this

Offline Toumaz

  • Veteran
  • *****
  • Posts: 1906
Re: Teleport to team
« Reply #8 on: November 14, 2008, 12:01:36 pm »
I wouldnt advise anyone downloading this. A normal script like that should be about 1-3 kbs, and this one is only 466bytes. It might be a virus or smth. I didnt download this so i dont know, and i might be wrong, but there is something suspicious about this

... have you ever heard of compressed files and/or scripts consisting of less than 1024 characters?

Code: [Select]
var
status: boolean;

procedure ActivateServer();
begin
status:=true;
end;

procedure OnPlayerSpeak(ID: Byte; Text: string);
begin
if ((Text ='!red') or (Text='!1') and (status=true) and (GetPlayerStat(ID,'Team')<>1)) then begin
Command('/setteam1 '+inttostr(ID));
end;
if ((Text='!blue') or (Text='!2') and (status=true) and (GetPlayerStat(ID,'Team')<>2)) then begin
Command('/setteam2 '+inttostr(ID));
end;
if ((Text='!spec') or (Text='!5') and (status=true) and (GetPlayerStat(ID,'Team')<>5)) then begin
Command('/setteam5 '+inttostr(ID));
end;
end;

Offline Norbo

  • Camper
  • ***
  • Posts: 338
Re: Teleport to team
« Reply #9 on: November 14, 2008, 01:29:28 pm »
I wouldnt advise anyone downloading this. A normal script like that should be about 1-3 kbs, and this one is only 466bytes. It might be a virus or smth. I didnt download this so i dont know, and i might be wrong, but there is something suspicious about this

... have you ever heard of compressed files and/or scripts consisting of less than 1024 characters?

Code: [Select]
var
status: boolean;

procedure ActivateServer();
begin
status:=true;
end;

procedure OnPlayerSpeak(ID: Byte; Text: string);
begin
if ((Text ='!red') or (Text='!1') and (status=true) and (GetPlayerStat(ID,'Team')<>1)) then begin
Command('/setteam1 '+inttostr(ID));
end;
if ((Text='!blue') or (Text='!2') and (status=true) and (GetPlayerStat(ID,'Team')<>2)) then begin
Command('/setteam2 '+inttostr(ID));
end;
if ((Text='!spec') or (Text='!5') and (status=true) and (GetPlayerStat(ID,'Team')<>5)) then begin
Command('/setteam5 '+inttostr(ID));
end;
end;

nope :D
well i guess i acted really foolishly there
sry :p

Offline dragus

  • Major(1)
  • Posts: 23
Re: Teleport to team
« Reply #10 on: November 15, 2008, 01:28:03 am »
Okey Thanks all