Author Topic: All Knives Into Flashbangs  (Read 1409 times)

0 Members and 1 Guest are viewing this topic.

Offline Mighty

  • Camper
  • ***
  • Posts: 276
All Knives Into Flashbangs
« on: July 11, 2010, 07:09:18 pm »
Name: All Knives Into Flashes!

Author: Mighty
Script version: 1.0.0
Server version: 2.6.5
Release Date: 12th of July 2010
Description:
Script switches Knife into Flashbang. Just throw it and wait till it explodes.
Admin Commands:
 * /flashmod <0/1>  - Script OFF/ON (default 1)
 * /flashwait <time>  - Time till knife explodes. (counted since hitting something) (default 3)
 * /flashlen <time> - Blinding time. (default 200)
 * /flashrange <range> - Flash Range (default 700)

Requirements:
  * Well it would be best if U changed knife dmg to 0, otherways U could kill with "granade". Your choice tho.

Notes:
  *  Remember that flash spot is place where knife hits, not where it lands!
---

---[/size]
Code: {snippets}
Code: [Select]
(...)
if FlashesOnCount > 0 then
begin
for i:=1 to 128 do
begin
if (Flash[i].Counter > 1)  then
begin
if (GetObjectStat(Flash[i].LinkedTo,'active') = true) then // If still on the ground
begin
// countinue countdown
Flash[i].Counter := Flash[i].Counter - 1;
end
else if (GetObjectStat(Flash[i].LinkedTo,'active') = false) then // If picked up during countdown
begin
WriteConsole(0,'Impressive! FlashBang picked up!',Yellow);
Flash[i].Counter := 0; // reset counter
FlashesOnCount := FlashesOnCount - 1; // substract picked knife
Flash[i].CounterStarted := FALSE; // reset vars so the flash can be used again
Flash[i].Used := FALSE;
ObjectLinked[Flash[i].LinkedTo] := FALSE; // unlink the object completely
end;
end;
if (Flash[i].Counter = 1) then // 1 because then there is no 2nd statement needed
begin
Flash[i].BlindMade := TRUE;
Flash[i].Counter := 0;
WriteConsole(0,'  *  Flash!  *  ',White);
for j:=1 to MaxPlayers do
if CheckFlash(i,j) = TRUE then Blind(j);
FlashesOnCount := FlashesOnCount - 1;
Flash[i].CounterStarted := FALSE;
Flash[i].Used := FALSE;
ObjectLinked[Flash[i].LinkedTo] := FALSE;
KillObject(Flash[i].LinkedTo); // totaly kill the knife (no longer on map)
end;
end;
end;
(...)

Questions? Bugs? Report please --> macekmil@gmail.com

From: July 13, 2010, 03:57:42 am
Update!

Now there is a version that doesn't change all knives into flashbangs, but only one!
« Last Edit: July 13, 2010, 08:58:24 am by Mighty »
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

Offline dominikkk26

  • Camper
  • ***
  • Posts: 404
    • PMGsite
Re: All Knives Into Flashbangs
« Reply #1 on: July 14, 2010, 02:04:00 am »
Helo, since the scripts, medic can do that the key to a cure for it why not do so:
Key 1 is an ordinary knife.
Key 2 is a flash grenade

Wiem ze ktoś może tego nie zrozumieć. Tu jest po polsku:
Helo skoro w skryptach, medic da się zrobić że klawiszami się leczy to czemu by nie zrobić tak:
Klawisz 1 to zwykły knife.
Klawisz 2 to granat Flash

Offline Mighty

  • Camper
  • ***
  • Posts: 276
Re: All Knives Into Flashbangs
« Reply #2 on: July 14, 2010, 05:19:52 am »
I didn't hear of any function allowing to do such things 0o Am i missing something? Are you sure this is allowed in 2.6.5 server version? I'm pretty sure it's not, it would be quite a surprise
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: All Knives Into Flashbangs
« Reply #3 on: July 14, 2010, 05:49:08 am »
He probably means the OnWeaponChange procedure medic:
Type 1) You force a player (medic) to have flamer and then when the throws it/changes to it he is healing allies.
Type 2) The player (medic) is healing his allies when changing weapons.

Read some of his posts, you might understand what is he saying. At least i hope you will as i dont.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Mighty

  • Camper
  • ***
  • Posts: 276
Re: All Knives Into Flashbangs
« Reply #4 on: July 14, 2010, 06:03:46 am »
yeah but this idea won't work in Flashbangs.

Yeah i did understand after i read Polish version (Im Pole also) :P
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: All Knives Into Flashbangs
« Reply #5 on: July 14, 2010, 06:06:48 am »
It might be possible with an simple OnPlayerCommand, lets say /flh would change it from ordinary to flash, and so on.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.