SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 22/08/2017, 03:44 PM   #21
X337
Gangsta
 
X337's Avatar
 
Join Date: Sep 2014
Location: Indonesia
Posts: 840
Reputation: 199
Default Re: Hunting System

Amazing as always. Keep up the good work.
__________________
viva la sa-mp

X337 is offline   Reply With Quote
Old 23/08/2017, 08:02 AM   #22
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,196
Reputation: 302
Default Re: Hunting System

Update v1.2.0:

- Fixed underground spawn

- Added check if spawn pos is out of moving_area

- Added check if spawn pos is out of world

- Updated example code

- Changed function:
PHP Code:
Hunting::GoTo(mobid,Float:x,Float:y,bool:disable_moving=false);
Hunting::Stop(mobid,delay=-1);
Hunting::Kill(mobid,playerid=INVALID_PLAYER_ID); 
- Changed callback:
PHP Code:
OnPlayerTakeHuntDrop(playerid,mobid,drop); //return 0 set drop flag 0 
- Added functions:
PHP Code:
Hunting::SetPos(mobid,Float:x,Float:y,Float:z,bool:disable_moving=false);
Hunting::ForceRespawn(mobid,Float:x,Float:y,Float:z);

Hunting::GetScaredRange(mobid);
Hunting::SetScaredRange(mobid,Float:range);

Hunting::GetPressTime(mobid);
Hunting::SetPressTime(mobid,miliseconds);

Hunting::GetFacingAngle(mobid);

Hunting::IsScared(mobid);

Hunting::IsPlayerInRange(playerid,mobid,Float:range); 
- Added extended function:
PHP Code:
Hunting::GetActiveMob(playerid,mob_state); 
- Added callback:
PHP Code:
OnAnimalScareStateChanged(mobid,playerid,isscared);
OnPlayerHuntDropStateChange(playerid,mobid,drop_state); //only called if press time > 0 
- Added definitions:
PHP Code:
HUNTING_DROP_STATE_FINISH
HUNTING_DROP_STATE_START
HUNTING_DROP_STATE_INTERRUPT 
AbyssMorgan is offline   Reply With Quote
Old 25/08/2017, 07:10 AM   #23
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,196
Reputation: 302
Default Re: Hunting System

Update v1.3.0:

- Minor bug fixes

- Added functions:
PHP Code:
Hunting::IsMoving(mobid);
Hunting::IsStopped(mobid);
Hunting::SetCalmTime(mobid,time=0); 
- Added callback:
PHP Code:
OnPlayerExitApproachingAnimal(playerid,mobid,mob_state); 
AbyssMorgan is offline   Reply With Quote
Old 08/09/2017, 09:46 PM   #24
Danisoni
Little Clucker
 
Join Date: Mar 2016
Posts: 7
Reputation: 0
Default Re: Hunting System

When i kill few deers, in few minutes, its like include disabled, deers in air, no movements, no actions on shoot, fix?

photo: http://prntscr.com/giuce5
Danisoni is offline   Reply With Quote
Old 09/09/2017, 05:29 AM   #25
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,196
Reputation: 302
Default Re: Hunting System

Quote:
Originally Posted by Danisoni View Post
When i kill few deers, in few minutes, its like include disabled, deers in air, no movements, no actions on shoot, fix?

photo: http://prntscr.com/giuce5
Show you hunting callbacks and animal creation code.
AbyssMorgan is offline   Reply With Quote
Old 09/09/2017, 09:00 AM   #26
Danisoni
Little Clucker
 
Join Date: Mar 2016
Posts: 7
Reputation: 0
Default Re: Hunting System

Quote:
Originally Posted by AbyssMorgan View Post
Show you hunting callbacks and animal creation code.
Creation - OnGameModeInit:
Code:
new huntzone = CreateDynamicRectangle(2199.00, -773.00, 2517.00, -517.00);
	for(new i = 0; i < 12; i++){
 	Hunting::Create(HUNTING_TYPE_DEER,2328.1748,-591.6104,129.7921,1.0,30,.moving_area=huntzone);
 }
Code:
public OnPlayerTakeHuntDrop(playerid,mobid,drop){ //Didnt used this jet...

    if(drop){
        new meso = random(10)+10;
        new platica = meso*7;
        Msg1( playerid, "(Lov) U ovom jelenu ima {68DAFF}%d kila mesa"B1", dobit ces dodatnih {68DAFF}%d$ "B1"na platu.", meso, platica);
    }
    return 0;
}

public OnPlayerKillHuntAnimal(playerid,mobid){
    return 1;
}

public OnPlayerApproachingAnimal(playerid,mobid,mob_state){
    return 1;
}

public OnAnimalScareStateChanged(mobid,playerid,isscared){

    if(isscared){
        Msg1( playerid, "(Lov) Uplasio si {FC3737}jelena"B1", budi oprezniji.");
    }
    return 1;
}
Danisoni is offline   Reply With Quote
Old 09/09/2017, 04:30 PM   #27
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,196
Reputation: 302
Default Re: Hunting System

Update v1.3.1:

- Fix server freeze after mob respawn
AbyssMorgan is offline   Reply With Quote
Old 09/09/2017, 04:51 PM   #28
Xeon™
Huge Clucker
 
Xeon™'s Avatar
 
Join Date: Jul 2017
Location: Earth
Posts: 311
Reputation: 37
Default Re: Hunting System

PHP Code:
#define _ :: 
CPawn++

Good job Abyss!
__________________
My Work:


- [FilterScript] Xeon's Speedmeter (Analog Speedmeter)
Xeon™ is offline   Reply With Quote
Old 09/09/2017, 05:27 PM   #29
AbyssMorgan
High-roller
 
AbyssMorgan's Avatar
 
Join Date: Apr 2015
Location: Poland
Posts: 1,196
Reputation: 302
Default Re: Hunting System

Quote:
Originally Posted by XeonMaster View Post
PHP Code:
#define _ :: 
CPawn++

Good job Abyss!
This is not idea for C++ XD
This is idea for more readable function names.
AbyssMorgan is offline   Reply With Quote
Old 09/09/2017, 05:38 PM   #30
Xeon™
Huge Clucker
 
Xeon™'s Avatar
 
Join Date: Jul 2017
Location: Earth
Posts: 311
Reputation: 37
Default Re: Hunting System

Quote:
Originally Posted by AbyssMorgan View Post
This is not idea for C++ XD
This is idea for more readable function names.
excepted xD
__________________
My Work:


- [FilterScript] Xeon's Speedmeter (Analog Speedmeter)
Xeon™ 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
Hunting system (deers) Unrea1 Screenshots and Videos 8 18/02/2017 11:23 PM
[FIRST HUNTING SYSTEM] by Fexurious Fexurious Screenshots and Videos 6 13/04/2014 10:56 AM
Hunting system. Closer14 Screenshots and Videos 0 26/06/2013 11:53 AM
Job Hunting Harold Everything and Nothing 4 21/11/2009 11:55 PM


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


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