Official Soldat Forums

Server Talk => Scripting Discussions and Help => Topic started by: 1221995 on October 07, 2007, 10:56:23 am

Title: request:no suicide
Post by: 1221995 on October 07, 2007, 10:56:23 am
Hi. I am wondering if it is possible to make a script that makes so u cant shoot yourself(you can butn it will do no damage). I think this would just be kinda fun cause u could use your own explosions to ricochet(fly around). please post, or leave the script if possible ASAP.

Thanks,
1221995
Title: Re: request:no suicide
Post by: DorkeyDear on October 07, 2007, 11:52:59 am
Code: [Select]
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer): integer;
begin
  if Shooter = Victim then Result := 0 else Result := Damage;
end;
Note that /kill will no longer work..
Title: Re: request:no suicide
Post by: 1221995 on October 07, 2007, 04:50:31 pm
ok, tahnks alot DorkeyDear :) ;) one maore problem. it no work. it just loads the old scripts. hers my folder setup. HELP PLEASE!!! [pigtail]
                                  >Default>Default pas files
soldatserver>scrpits>
                                  >Nosuicide>nosuicide.pas, includes.txt
Includes.txt has:
nosuicide.pas
in it and thats all. Help? [medikit]
please respond

1221995
Title: Re: request:no suicide
Post by: DorkeyDear on October 08, 2007, 05:10:07 pm
no error or crash? it just has no effect on server?
what other scripts u got on the server? one might try to set the damage back to what it was...
Title: Re: request:no suicide
Post by: EnEsCe on October 08, 2007, 08:28:13 pm
Read the damn readme.txt in /scripts/ folder.... It clearly says at the top

  NOTE: DO NOT PLACE *.PAS FILES IN THIS DIRECTORY! ONLY IN SUB-FOLDERS!

Which you have done.
Title: Re: request:no suicide
Post by: 1221995 on October 09, 2007, 03:01:33 pm
no i havnt. its in a folder "nosuicide" In scripts folder i have default, nosuicide (which this script is in) and README.txt. It is in a sub folder, and i read readme.txt 6 times, and it still no work after i redo everything like... 5oo times.

EDIT: I tried it 1 more time, this time i named the .pas file the EXACT SAME THING as the folder, and instead of includes.txt and damage.txt, i named them includes and damage.

YAAAY!!! ;D