06.12.2012, 12:43
Hello!
My problem is with "SetPlayerAttachedObject" function, When I type /santahat, it gives you a santa hat -.-' but it just dissapear after 2 seconds. How can i avoid that? + how can i remove the hat with the same command ?(/santahat)
Thanks in advance
My problem is with "SetPlayerAttachedObject" function, When I type /santahat, it gives you a santa hat -.-' but it just dissapear after 2 seconds. How can i avoid that? + how can i remove the hat with the same command ?(/santahat)
PHP код:
if (strcmp("/santahat", cmdtext, true, 10) == 0)
{
new pname[24];
new string[128];
GetPlayerName(playerid,pname,sizeof(pname));
format(string,sizeof(string),"[_Christmas_] %s(%d) is wearing a sant hat! You can do it too by typing /santahat",pname,playerid);
SendClientMessageToAll(COLOR_CYAN,string);
SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
return 1;
}