Author Topic: What's wrong ? / How to give grenades ?  (Read 923 times)

0 Members and 2 Guests are viewing this topic.

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
What's wrong ? / How to give grenades ?
« on: August 28, 2008, 12:30:43 pm »
1.
Code: [Select]
procedure OnJoinGame(ID, Team: byte);
begin
  case GetPlayerStat(ID,'Name') of 'Vortex', 'Elite', 'Fallen': begin
    if GetPlayerStat(ID,'Human') = true then begin
      WriteConsole(ID,'Your name is disallowed, change it !',$FFFF0000);
      Command('/kick ' + IntToStr(ID));
    end;
  end;

  case GetPlayerStat(ID,'Name') of
    'Elite': BotChat(ID, 'Let''s rock !');

    'Vortex': BotChat(ID, 'WTF I''m doing here ? Anyway...Let''s have fun !');

    'Fallen': BotChat(ID, 'You''ll meet your destiny !');
  end;
end;

I don't know what i done wrong :(
I know only there is Syntax error in 10: 3(in this piece).

2. How to give player grenades ?

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: What's wrong ? / How to give grenades ?
« Reply #1 on: August 28, 2008, 12:57:03 pm »
1: dunno
2: spawn a nadebox on them

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: What's wrong ? / How to give grenades ?
« Reply #2 on: August 28, 2008, 01:18:07 pm »
case GetPlayerStat(ID,'Name') of 'Vortex', 'Elite', 'Fallen': begin

Case needs 1 end, ALSO begin needs it too!


...
      WriteConsole(ID,'Your name is disallowed, change it !',$FFFF0000);
      Command('/kick ' + IntToStr(ID));
    end;
  end;
  end;
...
Also Known As REIMA


Lol Happles (happy apples)

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: What's wrong ? / How to give grenades ?
« Reply #3 on: August 28, 2008, 01:19:13 pm »
No, don't spawn nadebox.
Use GiveBonus. That gives the bonus directly to the specified player.
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: What's wrong ? / How to give grenades ?
« Reply #4 on: August 29, 2008, 12:58:39 am »
Thx, it's working   :D