SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 25/12/2012, 03:45 PM   #1
Dinnozor
Little Clucker
 
Join Date: Aug 2012
Location: France
Posts: 31
Reputation: 65
Default Deer Hunting ! (v1.02 -Pastebin fixed)




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 : http://forum.sa-mp.com/showthread.php?t=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 : http://forum.sa-mp.com/showthread.php?t=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 : http://forum.sa-mp.com/showthread.php?t=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 !

Last edited by Dinnozor; 04/01/2013 at 06:54 PM. Reason: Update 1.02 -fix
Dinnozor is offline   Reply With Quote
Old 25/12/2012, 04:49 PM   #2
Pasa
Big Clucker
 
Join Date: Jun 2011
Location: BiH <3
Posts: 155
Reputation: 15
Default Re: Deer Hunting !

i have put it in the scrpt and now when i shoot on the deers nothing hapend!
__________________
Pasa is offline   Reply With Quote
Old 25/12/2012, 06:17 PM   #3
Ernests
Big Clucker
 
Ernests's Avatar
 
Join Date: Apr 2011
Posts: 79
Reputation: 4
Default Re: Deer Hunting !

Very nice work!
__________________
Sorry for my bad english!
Ernests is offline   Reply With Quote
Old 25/12/2012, 06:26 PM   #4
[HRD]Mar1
Huge Clucker
 
Join Date: Oct 2011
Posts: 213
Reputation: 11
Default Re : Deer Hunting !

Nice one dinno
__________________

^
Welcome to our ******** page fb.me/MoroccanDmServer!

Click here if i helped u! http://forum.sa-mp.com/reputation.php?p=2297236
[HRD]Mar1 is offline   Reply With Quote
Old 25/12/2012, 08:00 PM   #5
DiGiTaL_AnGeL
High-roller
 
DiGiTaL_AnGeL's Avatar
 
Join Date: Aug 2012
Location: România
Posts: 1,923
Reputation: 104
Default Re: Deer Hunting !

Nice idea, but translate the FS to english.
__________________

DiGiTaL_AnGeL is offline   Reply With Quote
Old 25/12/2012, 08:37 PM   #6
Dinnozor
Little Clucker
 
Join Date: Aug 2012
Location: France
Posts: 31
Reputation: 65
Default Re: Deer Hunting !

Quote:
Originally Posted by Pasa View Post
i have put it in the scrpt and now when i shoot on the deers nothing hapend!
Please post some screens or more info about this... I would be really surprised the code doesn't work since this is just copy/paste from my GM. Make sure you've put everything in the right callback. If other people report these kind of problems, I will check again if I didn't forget everything.

Quote:
Originally Posted by DiGiTaL_AnGeL View Post
Nice idea, but translate the FS to english.
Here it is Check the new Pastebin, the texts should be fully translated and ready to put on English servers !
Dinnozor is offline   Reply With Quote
Old 25/12/2012, 09:06 PM   #7
Andregood
Huge Clucker
 
Andregood's Avatar
 
Join Date: Oct 2009
Location: Sweden
Posts: 285
Reputation: 26
Default Re: Deer Hunting !

I was creating something extremely similar for my server. This is loads better though, seems epic
Andregood is offline   Reply With Quote
Old 25/12/2012, 09:08 PM   #8
Vukilore
Huge Clucker
 
Vukilore's Avatar
 
Join Date: Jan 2011
Location: http://forum.sa-mp-fr.com/index.php
Posts: 300
Reputation: 110
Default Re : Deer Hunting !

Oh, another exclusif system scripted by xXkevin69darkillerOO for his nooby server now
Btw, good job it's great idea, i've already done it on my server month ago with cow
__________________
http://forum.sa-mp-fr.com/index.php. << here rest the french forum, in piece.
Vukilore is offline   Reply With Quote
Old 25/12/2012, 09:50 PM   #9
Basssiiie
Gangsta
 
Basssiiie's Avatar
 
Join Date: Mar 2011
Location: The Netherlands
Posts: 758
Reputation: 191
Default Re: Deer Hunting !

What if you shoot above or below the deer? Will it hit the deer too? I don't see a check in your script to prevent that.
Basssiiie is offline   Reply With Quote
Old 25/12/2012, 09:50 PM   #10
Mellnik
Gangsta
 
Mellnik's Avatar
 
Join Date: Dec 2011
Location: Paradise Falls, CAℕADA
Posts: 767
Reputation: 373
Default AW: Deer Hunting !

This is madness thanks dude rep+
Mellnik 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
Deer Head Object MisterTickle Help Archive 3 30/10/2010 02:59 AM
Job Hunting Smithy Everything and Nothing 4 21/11/2009 11:55 PM
Deer hunter 2005 sesion anyone? D: Rozzie Everything and Nothing 2 26/12/2008 12:02 AM


All times are GMT. The time now is 11:51 PM.


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