[FilterScript] Deer Hunting !
#1




Is this picture bothering you ? Tired of Bambi ? Do you miss the hunting sessions in Red Dead Redemption ? Or maybe is it only hunger ?.. Anyway, you might enjoy what is following !
Quote:

Twenty deers are running through Los Santos woods... Your job there is to catch them ! Be careful and stay quiet ! Any engine noise, your own presence or any gunshot might make them flee !

Once shot (or ran over...), you'll have to take your knife (katana, or chainsaw ) to take the pieces of meat out of the deer. According to the deer, and how much you've "damaged" it (you would rather shoot Bambi with a hunting rifle than with a AK47...) you might get 30lbs of meat to ... nothing, if you ran over it, then shoot it, etc... You wouldn't eat it anyway.

I would like to emphasize the fact that this script doesn't use any NPC, and the deer object is actually included in SAMP since the 0.3c - I actually made this script because I thought it was unfair no one would use this object made with love by SAMP Teams...

Update ( 24/08 ) : From now on, instead of stabbing in the air, you'll have to press and hold LMB to get the meat, an anim being played (thanks to Virtual1ty for its suggestion about that ). Please have a look at the video following showing you this new system, but also what happens when you hit a deer with your car...

Update ( 25/08 ) :

A virus makes the deers be aggressive to the hunter ; if you get too close, it will attack you ! Also it won't be eatable. However this virus is still rare, only 3% of the deer population is hit by it (for the moment...).

This is how I originally introduced this original and unique script in SAMP, in this thread : https://sampforum.blast.hk/showthread.php?tid=371469


Download :
Pastebin v1.02(English - fixed)

v1.02 fixes :
  • Greatly increased the accuracy ; added a parameter to IsPlayerAimingPoint function (weapon)
  • Another orientation problem corrected
  • Added a condition in the OnPlayerUpdate (which you can actually replace by a callback called less frequently) so there won't be loops on every update
v1.01 fixes :
  • Use of GetPlayerCameraFrontVector instead of GetPlayerFacingAngle : checks the Z coord, you can't "cheat" only using your facing angle (thanks to Basssiiie for the idea)
  • IsPlayerAimingObject is now IsPlayerAimingPoint (see details in the first page).
  • Modified the FinDeer function because it had a bug when you picked the meat. If you clicked several times on LMB you could take more. -Fixed
  • Corrected a bug of the deer orientation during its movement
  • a few little bugs fixed
Features
  • Moving deers - they are like bots, will move in areas near LS. If you shoot near them they will flee.
  • Possibility to add areas where the animals can move.
  • Good for RP : can add a job ; you get meat from the deers you shoot.
  • Crazy deers system - totally up to you to set it or not...
  • Functions & stocks:
    pawn Code:
    stock IsPlayerAimingPoint(playerid, Float:X2,Float:Y2,Float:Z2, Float:range,Float:accuracy)
    stock CreateDeer(Float:X,Float:Y)
    public DestroyDeer(DeerID)
    public MovingDeer(DeerID)
    stock IsPosInDeerZone(Float:X,Float:Y)
    stock OnPlayerShoot(playerid,oldammo,newammo,weapon)
    public FinDeer(DeerID,playerid)

    stock IsPlayerAimingObject(playerid, aimid)//Out of date since 1.01, now IsPlayerAimingPoint
  • Commands :
    Code:
    /resetdeers - lets admins respawn the deers
  • Etc... See the videos below
Videos

Introduction
[ame]http://www.youtube.com/watch?v=3gkjqwgIJAg&feature=player_embedded[/ame]

1st update
[ame="http://www.youtube.com/watch?v=-g5gr2v6960&feature=plcp"]Video[/ame]

Crazy deers stuff (1st part of the video)
[ame="http://www.youtube.com/watch?v=vbjTqNTdCB4&feature=player_embedded"]Video[/ame]


Bugs still known :
  • Sometimes you might have to shoot several times to hit your target, since you can't get a really accurate result with the GetPlayerCameraFrontVector. You can change the "accuracy" field of the IsPlayerAimingPoint to make it easier to hit the target (increase accuracy) or harder (decrease it). -Fixed in 1.02
  • I apparently have some trouble using atan function because the deers won't always be orientated as they should when they move. However it is not a problem to have fun with this FS.
Important notes

Don't forget to read the informations in the comments in the Pastebin. Also there are some files you'll need :
  • Download the "SAfull.hmap" file here : https://sampforum.blast.hk/showthread.php?tid=273263 . Put it in your scriptfiles folder.
    /!\ Don't put MapAndreas include in your script, just the .hmap file ; or just remove the GetPointZPos stock in my script.
  • Download the OnPlayerVehicleDamage include here : https://sampforum.blast.hk/showthread.php?tid=276059
  • It is better to use the Incognito Streamer you can find on these forums. Although it is not needed, you can make the script work without it. Just replace the DynamicObject with simple Objects
  • Don't forget to replace with your own variables in the PlayerInfo ones.
You should not encounter any problem if you read carefully the informations in the pastebin. However, don't hesitate to report any mistake, untranslated stuff in the pastebin. Ask questions if needed.

Use and/or modify the script as you want, but if you share it, credits are always welcome !

Enjoy !
Reply


Messages In This Thread
Deer Hunting ! (v1.02 -Pastebin fixed) - by Dinnozor - 25.12.2012, 15:45
Re: Deer Hunting ! - by Pasa - 25.12.2012, 16:49
Re: Deer Hunting ! - by Ernests - 25.12.2012, 18:17
Re : Deer Hunting ! - by [HRD]Mar1 - 25.12.2012, 18:26
Re: Deer Hunting ! - by DiGiTaL_AnGeL - 25.12.2012, 20:00
Re: Deer Hunting ! - by Dinnozor - 25.12.2012, 20:37
Re: Deer Hunting ! - by Andregood - 25.12.2012, 21:06
Re : Deer Hunting ! - by Vukilore - 25.12.2012, 21:08
Re: Deer Hunting ! - by Basssiiie - 25.12.2012, 21:50
AW: Deer Hunting ! - by Mellnik - 25.12.2012, 21:50
Re: Deer Hunting ! - by Basssiiie - 26.12.2012, 11:44
Re: Deer Hunting ! - by Dinnozor - 26.12.2012, 11:58
Re: Deer Hunting ! - by Dinnozor - 29.12.2012, 11:38
Re: Deer Hunting ! - by TheArcher - 01.01.2013, 17:33
Re: Deer Hunting ! - by Dinnozor - 01.01.2013, 19:33
Re: Deer Hunting ! - by TheArcher - 01.01.2013, 19:45
Re: Deer Hunting ! - by Dinnozor - 01.01.2013, 19:52
Re: Deer Hunting ! - by TheArcher - 01.01.2013, 19:57
Re: Deer Hunting ! - by Dinnozor - 01.01.2013, 20:02
Re: Deer Hunting ! - by Da' J' - 04.01.2013, 14:36
Re: Deer Hunting ! - by Dinnozor - 04.01.2013, 15:45
Re: Deer Hunting ! - by Zuriev - 04.01.2013, 15:55
Re: Deer Hunting ! - by Da' J' - 04.01.2013, 16:01
Re: Deer Hunting ! - by Dinnozor - 04.01.2013, 16:27
Re: Deer Hunting ! - by Alex47 - 04.01.2013, 16:45
Re: Deer Hunting ! - by Da' J' - 04.01.2013, 16:48
Re: Deer Hunting ! - by Dinnozor - 04.01.2013, 17:32
Re: Deer Hunting ! - by changeME - 05.01.2013, 03:36
Re: Deer Hunting ! - by jamesmercer1947 - 05.01.2013, 05:56
Re: Deer Hunting ! - by AlexSkyrise - 05.01.2013, 07:56
Re: Deer Hunting ! - by Pro4hock - 05.01.2013, 07:59
Re: Deer Hunting ! - by Da' J' - 06.01.2013, 18:34
Re: Deer Hunting ! - by Dinnozor - 07.01.2013, 07:25
Re: Deer Hunting ! - by Voldemortt - 07.01.2013, 18:39
Re: Deer Hunting ! - by riodespain - 26.06.2013, 17:42
Re: Deer Hunting ! - by dEcooR - 27.06.2013, 13:06
Re: Deer Hunting ! - by VodkaS - 27.06.2013, 13:17
Re: Deer Hunting ! - by kokoshkata - 27.06.2013, 15:23
Re: Deer Hunting ! - by denom - 28.06.2013, 06:50
Re: Deer Hunting ! - by K3 - 28.06.2013, 07:19
Re: Deer Hunting ! - by AIped - 28.06.2013, 07:56
Re: Deer Hunting ! - by NoahF - 28.06.2013, 11:33
Re: Deer Hunting ! - by Inverse - 29.06.2013, 06:50
Re: Deer Hunting ! - by fiha4155 - 02.08.2013, 13:18
Re: Deer Hunting ! - by [UG]Daniel - 02.08.2013, 13:54
Re: Deer Hunting ! - by cuemur - 21.01.2014, 11:33
Re: Deer Hunting ! - by Rengers1 - 30.07.2015, 09:14
Re: Deer Hunting ! - by tboysamp - 31.07.2015, 06:14
Re: Deer Hunting ! - by Crayder - 31.07.2015, 07:24
Respuesta: Deer Hunting ! - by Coringa253 - 31.07.2015, 14:47
Re: Deer Hunting ! - by NGGSoft - 05.09.2015, 23:54
Re: Deer Hunting ! - by cuc123 - 15.07.2016, 10:35
Re: Deer Hunting ! - by Luicy. - 15.07.2016, 11:01

Forum Jump:


Users browsing this thread: 1 Guest(s)