SA-MP Forums Archive
Christmas Hat - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Christmas Hat (/showthread.php?tid=400564)



Christmas Hat - WiseRice - 19.12.2012

Quote:

{
if(!strcmp(cmdtext, "/santa", true))
{
SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
return SendClientMessage(playerid, 0x00FF00FF, "Santa hat equipped!");
}
if(!strcmp(cmdtext, "/remove", true))
{
if(IsPlayerAttachedObjectSlotUsed(playerid, 3))
{
RemovePlayerAttachedObject(playerid, 3);
SendClientMessage(playerid, 0x00FF00FF, "Equipped objects removed.");
}
return 1;
}
return 0;
}

This is a santa hat i found online...well i wanna make it automatic when i player first logs in or registers it will automatically be on him


Re: Christmas Hat - Faisal_khan - 19.12.2012

Add this under the register code.
pawn Код:
SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);



Re: Christmas Hat - WiseRice - 19.12.2012

Not Works


Re: Christmas Hat - SilverKiller - 19.12.2012

Type this Under OnPlayerSpawn

Код:
SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
If I helped, Please +REP me!


Re: Christmas Hat - WiseRice - 19.12.2012

Still Not work, how to make it on every person skin automatically?


Re: Christmas Hat - SilverKiller - 19.12.2012

Type this under OnPlayerConnect

Код:
SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);



Re: Christmas Hat - WiseRice - 19.12.2012

Its spawns on our head for like 2 seconds then disappears


Re: Christmas Hat - SilverKiller - 19.12.2012

But Look In My Server I Have It Like this and it works

Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
    return 1;



Re: Christmas Hat - WiseRice - 19.12.2012

hmmm i dont know im using ravens roleplay i add the script you told me no errors but not spawn properly


Re: Christmas Hat - SilverKiller - 19.12.2012

probably if he uses an admin system, but you can see it is working fine in my server

IP : 212.7.208.70:7777