SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 30/01/2016, 08:04 AM   #1
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,213
Reputation: 351
Cool 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

Last edited by AbyssMorgan; 11/10/2019 at 01:59 PM. Reason: Update v2.7.0
AbyssMorgan is offline   Reply With Quote
Old 30/01/2016, 08:44 AM   #3
K0P
Banned
 
Join Date: Nov 2015
Location: *.*.*.*
Posts: 599
Reputation: 87
Default Re: Knife Shot

You should increase the speed of the knife a little bit
K0P is offline   Reply With Quote
Old 30/01/2016, 08:46 AM   #4
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,213
Reputation: 351
Default Re: Knife Shot

Quote:
Originally Posted by K0P View Post
You should increase the speed of the knife a little bit
just change the value
#define KNIFE_SPEED (12.0)
AbyssMorgan is offline   Reply With Quote
Old 30/01/2016, 02:19 PM   #5
HaRdiiZin
Gangsta
 
HaRdiiZin's Avatar
 
Join Date: Jan 2015
Location: localhost/HaRdiiZin
Posts: 805
Reputation: 98
Default Respuesta: Knife Shot

Good job.
HaRdiiZin is offline   Reply With Quote
Old 31/01/2016, 09:14 AM   #6
Amunra
Gangsta
 
Amunra's Avatar
 
Join Date: Nov 2015
Location: Indonesian
Posts: 502
Reputation: 12
Default Re: Knife Shot

Good IDEA ....
But...
Quote:
pawno\include\3DTryg.inc(251) : error 017: undefined symbol "FLOAT_INFINITY"
How to fix ?
__________________
Legendary Criminals


Amunra is offline   Reply With Quote
Old 31/01/2016, 09:16 AM   #7
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,213
Reputation: 351
Default Re: Knife Shot

I recommend update you streamer

From streamer.inc
PHP Code:
#if !defined FLOAT_INFINITY
    #define FLOAT_INFINITY (Float:0x7F800000)
#endif 
AbyssMorgan is offline   Reply With Quote
Old 31/01/2016, 09:22 AM   #8
Amunra
Gangsta
 
Amunra's Avatar
 
Join Date: Nov 2015
Location: Indonesian
Posts: 502
Reputation: 12
Default Re: Knife Shot

Quote:
Originally Posted by AbyssMorgan View Post
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 ?
__________________
Legendary Criminals


Amunra is offline   Reply With Quote
Old 31/01/2016, 09:25 AM   #9
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,213
Reputation: 351
Default Re: Knife Shot

Quote:
Originally Posted by Amunra View Post
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
AbyssMorgan is offline   Reply With Quote
Old 31/01/2016, 09:28 AM   #10
Amunra
Gangsta
 
Amunra's Avatar
 
Join Date: Nov 2015
Location: Indonesian
Posts: 502
Reputation: 12
Default Re: Knife Shot

Quote:
Originally Posted by AbyssMorgan View Post
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 !
__________________
Legendary Criminals


Amunra is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect if player has Shot someone else (And been Shot)? DarrenReeder Help Archive 9 04/04/2010 06:37 PM
Knife from behind bug Striker_Moe Help Archive 3 18/09/2009 07:10 PM


All times are GMT. The time now is 04:50 AM.


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