SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Filterscripts (https://forum.sa-mp.com/forumdisplay.php?f=17)
-   -   [FilterScript] Knife Shot (https://forum.sa-mp.com/showthread.php?t=599773)

AbyssMorgan 30/01/2016 08:04 AM

Knife Shot
 
Hello, I would like to present you the Knife Shot Script

Video:
https://www.youtube.com/watch?v=WJZCn3XXRHY

Download:
Knife.inc
3DTryg.inc Thread
ColAndreas Plugin

Installation:
PHP Code:

#include <3DTryg>
#include <Knife> 

Functions:
PHP Code:

Knife::ToggleUseTeam(bool:toggle); //default: false
Knife::IsToggleUseTeam();
Knife::ToggleForAll(bool:toggle); //default: false
Knife::IsToggleForAll();
Knife::ToggleForPlayer(playerid,bool:toggle); //default: false
Knife::IsToggleForPlayer(playerid);
Knife::GetDamage(playerid);
Knife::SetDamage(playerid,Float:amount);
Knife::GetSpeed(playerid);
Knife::SetSpeed(playerid,Float:speed);
Knife::GetRange(playerid);
Knife::SetRange(playerid,Float:range);
Knife::GetAmmo(playerid);
Knife::SetAmmo(playerid,ammo);
Knife::TogglePoisoning(playerid,bool:toggle);
Knife::IsTogglePoisoning(playerid);
Knife::GetPoisoningTime(playerid);
Knife::SetPoisoningTime(playerid,seconds);
Knife::GetPoisoningDamage(playerid);
Knife::SetPoisoningDamage(playerid,Float:damage);* 

Callbacks:
PHP Code:

OnPlayerRequestKnifeShot(playerid,targetid); //return 0 - prevent to use knife shoot (this callback is called also if ammo is 0) 

Definitions:
PHP Code:

KNIFE_SPEED
KNIFE_MAX_RADIUS
KNIFE_REFRESH_ACTION
KNIFE_REFRESH_MISS
KNIFE_DAMAGE
KNIFE_WEAPON_AMMO_INFINITY
KNIFE_DOT_POISONING
KNIFE_POISONING_TIME

WEAPON_KNIFE_THROWN
WEAPON_KNIFE_POISONING 

Activation:
PHP Code:

WeaponKnife

Step 1
Right Mouse Button
Step 2
Left Mouse Button 

Notice:
Filterscript not exist because filterscripts have limits.
This has been replaced by include, having automatic installation, efficient GameMode/FilterScript.


Non-Registered Users:
Bug Report

SyS 30/01/2016 08:17 AM

Re: Knife Shot
 
Nice fs +rep

K0P 30/01/2016 08:44 AM

Re: Knife Shot
 
You should increase the speed of the knife a little bit

AbyssMorgan 30/01/2016 08:46 AM

Re: Knife Shot
 
Quote:

Originally Posted by K0P (Post 3649279)
You should increase the speed of the knife a little bit

just change the value
#define KNIFE_SPEED (12.0)

HaRdiiZin 30/01/2016 02:19 PM

Respuesta: Knife Shot
 
Good job.

Amunra 31/01/2016 09:14 AM

Re: Knife Shot
 
Good IDEA ....
But...
Quote:

pawno\include\3DTryg.inc(251) : error 017: undefined symbol "FLOAT_INFINITY"
How to fix ?

AbyssMorgan 31/01/2016 09:16 AM

Re: Knife Shot
 
I recommend update you streamer

From streamer.inc
PHP Code:

#if !defined FLOAT_INFINITY
    #define FLOAT_INFINITY (Float:0x7F800000)
#endif 


Amunra 31/01/2016 09:22 AM

Re: Knife Shot
 
Quote:

Originally Posted by AbyssMorgan (Post 3649975)
I recommend update you streamer

From streamer.inc
PHP Code:

#if !defined FLOAT_INFINITY
    #define FLOAT_INFINITY (Float:0x7F800000)
#endif 


Your Mean Streamer version 2.7.9 ?

AbyssMorgan 31/01/2016 09:25 AM

Re: Knife Shot
 
Quote:

Originally Posted by Amunra (Post 3649978)
Your Mean Streamer version 2.7.9 ?

Yes

Check your streamer.inc whether it has FLOAT_INFINITY

//edit: the problem will be fixed in version 3DTryg.inc 2.1G

Amunra 31/01/2016 09:28 AM

Re: Knife Shot
 
Quote:

Originally Posted by AbyssMorgan (Post 3649979)
Yes

Check your streamer.inc whether it has FLOAT_INFINITY

Can you give me a Download Link From Solidfiles ?
-a Pack Plugins Of Streamer 2.7.9-

My Computer Has Problem With opening Github link !


All times are GMT. The time now is 03:19 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.