Hello.
Today i started creating deer hunting system.
. Whats wrong?
I want to set angle on random and then Move Object Forward.
PHP код:
for(new i;i<alldeers;i++)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, Huntingsys[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:xiki, Float:yiki, Float:ziki;
GetDynamicObjectPos(Huntingsys[i][deerobject], xiki,yiki,ziki);
new Float:x, Float:y, Float:z;
SetDynamicObjectRot(Huntingsys[i][deerobject], 0.0, 0.0, deerzrandom);
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,z, 5.0);
}
}