Snow problem!
#1

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;
}
Reply
#2

pawn Код:
CMD:snow(playerid, params[])
{
    if(!snowtf[playerid])
    {
        SetPlayerAttachedObject(playerid, 0, 18864, 2, 25, 7, -10);
        snowtf[ playerid ] = true;
       
        //SendClientMessage(playerid, -1, "* snow on");
    }
    else
    {
        RemovePlayerAttachedObject(playerid, 0);
        snowtf[ playerid ] = false;
       
        //SendClientMessage(playerid, -1, "* snow off");
    }
    return 1;
}
Worked for me - You can remove the "snow[ MAX_PLAYERS ]", and just keep the "snowtf" variable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)