MoveObject
#1

Hello.
Today i started creating deer hunting system.
Heres my code, but Object Is Not Stoping . Whats wrong?
I want to set angle on random and then Move Object Forward.
PHP код:
    for(new i;i<alldeers;i++)
    {
        if(
IsPlayerInRangeOfPoint(playerid10.0Huntingsys[i][deerx],Huntingsys[i][deery],Huntingsys[i][deerz]))
        {
            if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK) return 1;
            new 
Float:deerzrandom random(100);
            new 
Float:deerxrandom random(100);
            new 
Float:xikiFloat:yikiFloat:ziki;
            
GetDynamicObjectPos(Huntingsys[i][deerobject], xiki,yiki,ziki);
            new 
Float:xFloat:yFloat:z;
            
SetDynamicObjectRot(Huntingsys[i][deerobject], 0.00.0deerzrandom);
            
MoveDynamicObject(Huntingsys[i][deerobject],Xrand,Yrand,Zrand+0.3,speedRand,0,0,Angle);
            
MapAndreas_FindZ_For2DCoord(x,y,z);
            
MoveDynamicObject(Huntingsys[i][deerobject],deerxrandom,yiki,z5.0);
        }
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)