Author Topic: Help, team mover!  (Read 1346 times)

0 Members and 1 Guest are viewing this topic.

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Help, team mover!
« on: April 01, 2008, 02:19:28 pm »
I tried to make team mover. Basicly it moves you back to Alpha when you try to go Bravo. This is what i've made this far, but it wont freakin work.

Quote
procedure OnPlayerRespawn(ID:Byte);
begin
if ((GetPlayerStat(ID,'Team') = 2 then begin
  WriteConsole(ID, 'Wrong team, moving you to team Alpha', $90C2A0);
  Command('/setteam2 '+IntToStr(ID));
end;


Edit edit... mods please move... i always manage to put these topics in wrong places x.X
« Last Edit: April 01, 2008, 02:25:12 pm by shantec »
Also Known As REIMA


Lol Happles (happy apples)

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: Help, team mover!
« Reply #1 on: April 01, 2008, 02:59:00 pm »
OnJoinTeam?

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: Help, team mover!
« Reply #2 on: April 01, 2008, 03:29:38 pm »
Code: [Select]
procedure OnJoinTeam(ID, Team: byte);
begin
  if Team=2 then begin
    WriteConsole(ID, 'Wrong team, moving you to team Alpha', $90C2A0);
    Command('/setteam1' +inttostr(ID));
  end;
end;

You'd probably want OnjoinTeam, you forgot an 'end' (that's why it wouldn't work) and i would make it setteam1, else it will be a nasty loop.
and posted in the wrong forum, but ok..   :P
Come join: EliteCTF
Listen to: My Music

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Help, team mover!
« Reply #3 on: April 02, 2008, 10:40:33 am »
Should be...
Code: [Select]
Command('/setteam1 ' + inttostr(ID));