SA-MP Forums Archive
[FilterScript] Santa 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Santa Hat (/showthread.php?tid=298110)



Santa Hat - Arsham7 - 19.11.2011

Hello. I have made a very very simple santa hat script. No need to download. I will post it here since its a short code. This was originally made for Unity-RPG by Makaveli aka Arsham. Enjoy this christmas!





Commands:

/santa - To equip santa hat.

/remove - To remove santa hat. (This removes the PlayerAttachedObject with the index of 3)



Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    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;
}
You can set your own color, but for me I use COLOR_LIME. this is LIME Green color. You have to it on top of your script.
Code:
 # COLOR_LIME          0x00FF00DC



Re: Santa Hat - Epic_Mickey - 19.11.2011

nice i wil use it for my christmas event!


Re: Santa Hat - Geryy - 19.11.2011

This FS topic only for once function SetPlayerAttached?


Re: Santa Hat - Epic_Mickey - 19.11.2011

Lol, do you use ****** translator or something? Very bad english =S


Re: Santa Hat - Hiddos - 19.11.2011

Even if inserted correctly into the script, it won't work:
pawn Code:
if (strcmp(cmdtext, "/santa", )==0)



Re: Santa Hat - Anzhelov - 19.11.2011

Good one. Gonna try it out.


Re: Santa Hat - Arsham7 - 19.11.2011

Quote:
Originally Posted by Hiddos
View Post
Even if inserted correctly into the script, it won't work:
pawn Code:
if (strcmp(cmdtext, "/santa", )==0)
Works perfectly fine. I don't know what you mean.


Re: Santa Hat - Marshall32 - 19.11.2011

Quote:
Originally Posted by Hiddos
View Post
Even if inserted correctly into the script, it won't work:
pawn Code:
if (strcmp(cmdtext, "/santa", )==0)
if you use the strcmp it wont work im using dcmd and just took the atachment it works .


Re: Santa Hat - Arsham7 - 19.11.2011

Quote:
Originally Posted by MrEdinLaw
View Post
if you use the strcmp it wont work im using dcmd and just took the atachment it works .
Yeah that's why, some people may be using different command functions like the one you are, or CMD but you can always use strcmp too, just place it under public OnPlayerCommandText :P and im glad it works.


Re: Santa Hat - Astralis - 19.11.2011

lol first I thought wtf. Nice fs. Tested,works.


Re: Santa Hat - [GA]Neon - 19.11.2011

Nice one.


Re: Santa Hat - Arsham7 - 19.11.2011

thanks for the good comments


Re: Santa Hat - Diablosrouge - 19.11.2011

now we have fireman hats and santa hats lol. Missing policemen hats.


Re: Santa Hat - Proxyded - 19.11.2011

sa-mp is becoming TF2, a Hat Simulator with First Person Shooter Features


Re: Santa Hat - Norn - 19.11.2011

Each skin has different height maps, surely this has to be adjusted for each skin?


Re: Santa Hat - Arsham7 - 19.11.2011

Quote:
Originally Posted by Norn
View Post
Each skin has different height maps, surely this has to be adjusted for each skin?
this is pretty basic and i tried it with lots of skins, seems to be fine. Some skins might have a little part sticking out from the skin if they already have a hat or their head is big. But overall its really basic for Christmas fun. I was actually searching for something like this but then i decided to learn and make one myself, so this is something i learned to do and i just posted it.

The pain was coordinating where its going to be on the head -.- uh what pain


Re: Santa Hat - rapidhost - 20.11.2011

would fancy a ZCMD translation.


Re: Santa Hat - N0FeaR - 20.11.2011

Nice work 8/10


Re: Santa Hat - SchurmanCQC - 20.11.2011

Quote:
Originally Posted by rapidhost
View Post
would fancy a ZCMD translation.
That's done very, very easily, if you know how to script.