Author Topic: nade-and medipackspawn script  (Read 973 times)

0 Members and 1 Guest are viewing this topic.

Offline Nubism

  • Major
  • *
  • Posts: 58
nade-and medipackspawn script
« on: July 23, 2008, 10:03:10 am »
anyone got a script to spawn medipacks(dno the name atm, the things u can take to get full life) and nades (the packs u can find to get nades that u can throw to enemies) on any special player to give them nades and full life so?
i wanted to make the command !nades to get nades and !health to get full health but can be something else.
hope that anyone can make it or give it to me...

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: nade-and medipackspawn script
« Reply #1 on: July 23, 2008, 10:11:56 am »
This is one of the easiest scripts you can do... (atleast almost?)

Code: [Select]
function OnPlayerSpeak(ID: byte; text: string): boolean;
begin
    Result := false;
    case Text of
        '!health': SpawnObject(GetPlayerStat(id,'x'),GetPlayerStat(id,'y'),16);
        '!nades': SpawnObject(GetPlayerStat(id,'x'),GetPlayerStat(id,'y'),17);
    end;
end;

I didn't bother to test it, but even though i can't be THAT bad scripter :P
Also Known As REIMA


Lol Happles (happy apples)

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: nade-and medipackspawn script
« Reply #2 on: July 23, 2008, 03:06:25 pm »
It would be better to use GiveBonus for 'nades, and DoDamage to set health; so that other ppl can't get them.

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: nade-and medipackspawn script
« Reply #3 on: July 23, 2008, 05:48:36 pm »
Wellll, he asked for SPAWNING, so i made it spawning :-\
Also Known As REIMA


Lol Happles (happy apples)

Offline chutem

  • Veteran
  • *****
  • Posts: 1119
Re: nade-and medipackspawn script
« Reply #4 on: July 24, 2008, 05:07:15 am »
Don't nit-pick, it would be better to use DoDamage and GiveBonus, for the reason that Curt stated.

It should also check health, and nades if it can (can't remember :P)
1NK3FbdNtH6jNH4dc1fzuvd4ruVdMQABvs

Offline Nubism

  • Major
  • *
  • Posts: 58
Re: nade-and medipackspawn script
« Reply #5 on: July 28, 2008, 02:25:14 am »
thanks ;D

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: nade-and medipackspawn script
« Reply #6 on: July 28, 2008, 02:09:01 pm »
It should also check health, and nades if it can (can't remember :P)
it can, two of the GetPlayerStat things