SA-MP Forums Archive
[FilterScript] Hunting System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Hunting System (/showthread.php?tid=639694)

Pages: 1 2 3


Re: Hunting System - AbyssMorgan - 23.08.2017

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 код:
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 код:
OnPlayerTakeHuntDrop(playerid,mobid,drop); //return 0 set drop flag 0 
- Added functions:
PHP код:
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 код:
Hunting::GetActiveMob(playerid,mob_state); 
- Added callback:
PHP код:
OnAnimalScareStateChanged(mobid,playerid,isscared);
OnPlayerHuntDropStateChange(playerid,mobid,drop_state); //only called if press time > 0 
- Added definitions:
PHP код:
HUNTING_DROP_STATE_FINISH
HUNTING_DROP_STATE_START
HUNTING_DROP_STATE_INTERRUPT 



Re: Hunting System - AbyssMorgan - 25.08.2017

Update v1.3.0:

- Minor bug fixes

- Added functions:
PHP код:
Hunting::IsMoving(mobid);
Hunting::IsStopped(mobid);
Hunting::SetCalmTime(mobid,time=0); 
- Added callback:
PHP код:
OnPlayerExitApproachingAnimal(playerid,mobid,mob_state); 



Re: Hunting System - Danisoni - 08.09.2017

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


Re: Hunting System - AbyssMorgan - 09.09.2017

Quote:
Originally Posted by Danisoni
Посмотреть сообщение
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.


Re: Hunting System - Danisoni - 09.09.2017

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
Show you hunting callbacks and animal creation code.
Creation - OnGameModeInit:
Код:
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);
 }
Код:
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;
}



Re: Hunting System - AbyssMorgan - 09.09.2017

Update v1.3.1:

- Fix server freeze after mob respawn


Re: Hunting System - Xeon™ - 09.09.2017

PHP код:
#define _ :: 
CPawn++

Good job Abyss!


Re: Hunting System - AbyssMorgan - 09.09.2017

Quote:
Originally Posted by XeonMaster
Посмотреть сообщение
PHP код:
#define _ :: 
CPawn++

Good job Abyss!
This is not idea for C++ XD
This is idea for more readable function names.


Re: Hunting System - Xeon™ - 09.09.2017

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
This is not idea for C++ XD
This is idea for more readable function names.
excepted xD


Re: Hunting System - Deadpoop - 17.09.2017

amazing


Re: Hunting System - Danisoni - 26.10.2017

I pmed you about infinite loop or server freeze problem, check it


Re: Hunting System - GamezCEO - 27.10.2017

Good idea. Might be useful for an RPG-type server.


Re: Hunting System - AbyssMorgan - 18.12.2017

Update v1.4.0

- Fix random server crash/freeze


Re: Hunting System - rfr - 18.12.2017

well done


Re: Hunting System - Grella - 20.12.2017

Perfect!!


Re: Hunting System - KatarinaCalzaghe - 13.02.2018

Update v1.4.1:

- Minor fixes for data validation


Re: Hunting System - Belengher - 31.03.2018

Not working for me...

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);
}

[ADM] Error: Failed to Hunting::Create(19315,2328.174804,-591.610412,129.792098,...) position out of world


Re: Hunting System - Edolas - 17.05.2018

anyone have the download link?


Re: Hunting System - ShadowBlack - 19.05.2018

please link?


Re: Hunting System - ShadowBlack - 20.05.2018

link?