17.09.2015, 00:09
For example like this:
PHP Code:
//In the /gravity command:
new Float:x,Float:y,Float:z,Float:a;
GetPlayerPos(playerid,x,y,z),GetPlayerFacingAngle(playerid,a);
const Float:distance = 3.0; //The distance from the player & the tag
x += distance * floatsin(-a,degrees); //To set the object in front of the player
y += distance * floatcos(-a,degrees); //To set the object in front of the player
CreateObject(18659,x,y,z,0,0,0); //18659 = the model of the grove spray tag