RemovePlayerAttachedObject doesnt work
#1

Hi!

/hat command is working, but /removehat doesnt work. Can u explain me the problem?
Код:
new = hat;
COMMAND:hat(playerid, params[])
{
	hat = CreateObject(19352, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
	AttachObjectToPlayer(hat, playerid, 0, 0, 0.95, 0.0, 0, 90);
 	SendClientMessage(playerid,  0xFFFFFFFF,"Hat mode: on");
 	return 1;
}
COMMAND:removehat(playerid, params[])
{
 	RemovePlayerAttachedObject(playerid, hat);
 	SendClientMessage(playerid,  0xFFFFFFFF,"Hat mode: off");
 	return 1;
}
And can u help me, how to destroey the object when player is dead?
Reply


Messages In This Thread
RemovePlayerAttachedObject doesnt work - by qkac1234 - 30.07.2013, 15:59
Re: RemovePlayerAttachedObject doesnt work - by thimo - 30.07.2013, 16:02
Re: RemovePlayerAttachedObject doesnt work - by ToiletDuck - 30.07.2013, 16:07
Re: RemovePlayerAttachedObject doesnt work - by rouzbeh - 30.07.2013, 16:12

Forum Jump:


Users browsing this thread: 1 Guest(s)