[FilterScript] Deer Hunting !
#12

Actually I tried with these functions but couldn't get a nice result... It has been a while I haven't changed the script but I remember having trouble with these, and not only with the deer hunting stuff...

So you can indeed shoot a deer aiming 100m above it (just blame gravity ? :P ), but once again this is for fun, so if people just want to "cheat" that way that's their problem..

For the moment I don't plan to modify it, but I note your suggestion and might be trying and pulling my hair off again to make it work with GetPlayerCameraFrontVector and GetPlayerCameraPos... Also I kind of have some trouble running SAMP with Wine (under Mac OS X Lion) ; it used to work but for a little while it just hasn't been working So I'll have to fix this before modifying the script...

Edit : adapted from another of my scripts, I will try this when my SAMP on Mac problem will be fixed :

pawn Код:
stock IsPlayerAimingObject(playerid, aimid)
{
    new Float:X1, Float:Y1, Float:Z1, Float:X2, Float:Y2, Float:Z2,Float:xv,Float:yv,Float:zv,Float:xc,Float:yv,Float:zc,Float:xt,Float:yt,Float:zt;
    GetPlayerPos(playerid, X1, Y1, Z1);
    GetPlayerCameraPos(playerid,xc,yc,zc);
    GetPlayerCameraFrontVector(playerid,xv,yv,zv);
    GetDynamicObjectPos(aimid, X2, Y2, Z2);
    new Float:Dist = floatsqroot(floatpower(floatabs(X1-X2), 2) + floatpower(floatabs(Y1-Y2), 2));
    if(Dist < 100)
    {
        for(new i=1;i<=100;i++)
        {
           
            xt=X1+i*xv;
            yt=Y1+yv*i;
            GetPointZPos(xt,yt,zt);
            Dist=floatsqroot(floatpower(floatabs(xt-X2), 2) + floatpower(floatabs(yt-Y2), 2)+floatpower(floatabs(zt-Z2),2));
            if (Dist<=0.5)
            {
                return true
            }
        }
    }
        return false;
}
It worked fine for another script. However it only had to check for a short distance (4), not like here, where it checks until 100. So maybe that would make a lot of calculation. I will make tests when I can, but tell me if you think something may be approved...
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: 3 Guest(s)