Author Topic: Unlimited nades  (Read 1468 times)

0 Members and 4 Guests are viewing this topic.

Offline Tosty

  • Soldier
  • **
  • Posts: 172
  • Ultimate TW Medic
    • Just Click it
Unlimited nades
« on: August 19, 2007, 12:41:51 pm »
Ok i need a way to have unlimited nades

I did set the nades in the soldat ini to 5000 but then when you play there is a masiv stick afnade like 3 time the size of your guy sticking out from your guy

what should i do



Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: Unlimited nades
« Reply #1 on: August 19, 2007, 12:48:47 pm »
Code: [Select]
procedure AppOnIdle(Ticks: integer);
  var i: byte;
begin
  for i := 1 to 32 do
    if (GetPlayerStat(i,'Active') = True) and (GetPlayerStat(i,'Grenades') < 2) then SpawnObject(GetPlayerStat(i,'x'),GetPlayerStat(i,'y'),17);
end;
« Last Edit: August 19, 2007, 12:53:14 pm by xmRipper »
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline Tosty

  • Soldier
  • **
  • Posts: 172
  • Ultimate TW Medic
    • Just Click it
Re: Unlimited nades
« Reply #2 on: August 19, 2007, 02:02:03 pm »
Ok thx i may not b new but i still dont know that much



Offline JoeCool

  • Major(1)
  • Posts: 35
  • Watdfuxup?
Re: Unlimited nades
« Reply #3 on: August 19, 2007, 02:58:19 pm »
how do you put in codes?/scripts?
[ban] TEH NOOBS

Offline Tosty

  • Soldier
  • **
  • Posts: 172
  • Ultimate TW Medic
    • Just Click it
Re: Unlimited nades
« Reply #4 on: August 19, 2007, 03:02:16 pm »
0_0

Omg Theres a Total Noob Here



Offline Toumaz

  • Veteran
  • *****
  • Posts: 1904
Re: Unlimited nades
« Reply #5 on: August 19, 2007, 03:06:50 pm »
how do you put in codes?/scripts?

First off, you need the latest dedicated Soldat server. Set Scripting=1 in server.ini and then read Soldatserver\scripts\default\Readme.txt to find out how to actually add the script. To quote the part most relevant to adding scripts:

Quote
How to add a script to your server:
  As of ScriptCorev2, you can have a maximum of 255 scripts running,
  However, dont go crazy and load as many as you can. It increases
  CPU and Memory usage, alot. Below are some steps to install a new
  script into your Soldat Dedicated Server (Version 2.6.2 or higher)
   1) Download the script you wish to install.
      If no "download" file is available, contact the script author
      for a "downloadable" version of the file.
   2) Open up your Soldat Server folder, and then open the /scripts/
      folder. If your downloaded file only has .pas files, you must
      create a NEW folder in the /scripts/ directory and name it
      something relating to the script you are installing. Eg: "PorkScript"
      If your download already has a sub-folder, just extract it to
      your /scripts/ directory and it should already be prepared to run.
   3) Run your Soldat Server, you should see your newly installed script
      appear in the console like: "Compiling PorkScript -> Core.pas..."
   4) Thats all! If you have any problems, please contact the author
      of the script which does not work. If Includes.txt is not present
      in the sub-folder, the script will not be recognised.

So basically swack that piece of code into a .pas file, put the pas file in a directory inside Soldatserver\scripts. Then create an Includes.txt there as well with the name of the .pas file inside.

0_0

Omg Theres a Total Noob Here
I admire the way you try to help him out.

Offline Tosty

  • Soldier
  • **
  • Posts: 172
  • Ultimate TW Medic
    • Just Click it
Re: Unlimited nades
« Reply #6 on: August 19, 2007, 03:12:02 pm »
Yah srry

Im just not good at explaining this kind of stuff



Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Unlimited nades
« Reply #7 on: August 19, 2007, 08:45:26 pm »
Code: [Select]
procedure AppOnIdle(Ticks: integer);
  var i: byte;
begin
  for i := 1 to 32 do
    if (GetPlayerStat(i,'Active') = True) and (GetPlayerStat(i,'Grenades') < 2) then SpawnObject(GetPlayerStat(i,'x'),GetPlayerStat(i,'y'),17);
end;
Doesn't GiveBonus also have something for nades? or is that only for clusters? It would be better to know that he gets it for sure than some1 walking by and stealing it :) then you goda wait a whole another second for another thing of nades.

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Unlimited nades
« Reply #8 on: August 19, 2007, 08:54:50 pm »
GiveBonus would be a better way to do it.