Author Topic: Need help with making a script  (Read 1088 times)

0 Members and 1 Guest are viewing this topic.

Offline Iszil

  • Major(1)
  • Posts: 21
Need help with making a script
« on: October 09, 2008, 08:53:04 pm »
I wanna find out a way of having a script for CTF, where u born with 2 M79, that makes no harm. No harming and endless grenades as well. And no more weapons; just that.

Please, help!

I've tried modifying the Soldat.ini and Weapons.ini, but as i get into soldat no changes happens.

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: Need help with making a script
« Reply #1 on: October 09, 2008, 10:38:41 pm »
Code: [Select]
procedure OnPlayerRespawn(ID: Byte);
begin
     ForceWeapon(ID,7,7,0);
end;
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer) : integer;
begin
     Damage := -9999;
end;
Not compiled, the idea is there though.
The endless grenades can be set in soldat.ini, same with only allowing m79

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Need help with making a script
« Reply #2 on: October 10, 2008, 05:18:04 am »
along with given script, set all weapons off in soldat.ini (disable anti-cheat, not sure which one); or just leave m79 on
may also want  a onweaponchange in the script so when they choose a weapon after respawn, they don't lose their 2nd m79 (if m79 is enabled on menu, if nothing is, no need for this i think)

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: Need help with making a script
« Reply #3 on: October 10, 2008, 05:34:25 am »

Offline Iszil

  • Major(1)
  • Posts: 21
Re: Need help with making a script
« Reply #4 on: October 10, 2008, 09:50:29 am »
Code: [Select]
procedure OnPlayerRespawn(ID: Byte);
begin
 ForceWeapon(ID,7,7,0);
end;
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer) : integer;
begin
 Damage := -9999;
end;
Not compiled, the idea is there though.
The endless grenades can be set in soldat.ini, same with only allowing m79

Where  am I suppoused to be pasting that?
I think is in one on the files in the dedicated server scripts folder, but which one and where (bottom???)

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: Need help with making a script
« Reply #5 on: October 10, 2008, 09:58:34 am »

Offline Iszil

  • Major(1)
  • Posts: 21
Re: Need help with making a script
« Reply #6 on: October 12, 2008, 01:48:33 am »
The thing is I dont know where to place that script u give me. I think it's in the Core file in the scripts folder of the dedicated server, but it doenst work, may be cuz i dont know how.

please help me.

Offline Toumaz

  • Veteran
  • *****
  • Posts: 1904
Re: Need help with making a script
« Reply #7 on: October 12, 2008, 01:55:56 am »
The thing is I dont know where to place that script u give me. I think it's in the Core file in the scripts folder of the dedicated server, but it doenst work, may be cuz i dont know how.

please help me.
Create a new directory inside soldatserver/scripts/, create a file called whatever.pas inside said directory, and paste the script into it. Then create a file called Includes.txt in the same directory, and add "whatever.pas" to it (without the quotes) and save it. Then start the server (make sure scripting=1 in server.ini) and it should load your script. If your server refuses to start, run it from a command window and tell us the error displayed.