23.12.2014, 17:24
The snow is not attaching to the player. I have tried do it with SetPlayerAttachedObject but I had that same problem. What is wrong?

Код:
new snow[MAX_PLAYERS];
CMD:snow(playerid, params[])
{
if(!snowtf[playerid])
{
new Float:x, Float:y, Float:z, Float:angle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
snow[playerid] = CreatePlayerObject(playerid, 18864, x, y, z-25, 1.0, 4.0, angle+42.0);
AttachObjectToPlayer(snow[playerid], playerid, x, y, z-25, 1.0, 4.0, angle+42.0);
snowtf[playerid] = true;
}else
{
DestroyPlayerObject(playerid, snow[playerid]);
snowtf[playerid] = false;
}
return 1;
}

