09.12.2011, 18:39
Hi visitors. If you can,give me code of santa hat please.
new Santahatinhead[MAX_PLAYERS];
CMD:santahat(playerid, params[])
{
if(!Santahatinhead[playerid])
{
Santahatinhead[playerid] = 1;
SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
SendClientMessage(playerid, COLOR_GREY, "You put your head in Santa Hat!");
}
else
{
Santahatinhead[playerid] = 0;
if(IsPlayerAttachedObjectSlotUsed(playerid, 3)) RemovePlayerAttachedObject(playerid, 3);
SendClientMessage(playerid, COLOR_GREY, "You took your santa hat off!");
}
return 1;
}