[FilterScript] Santa Hat
#1

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
Reply
#2

nice i wil use it for my christmas event!
Reply
#3

This FS topic only for once function SetPlayerAttached?
Reply
#4

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

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

Good one. Gonna try it out.
Reply
#7

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.
Reply
#8

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 .
Reply
#9

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.
Reply
#10

lol first I thought wtf. Nice fs. Tested,works.
Reply
#11

Nice one.
Reply
#12

thanks for the good comments
Reply
#13

now we have fireman hats and santa hats lol. Missing policemen hats.
Reply
#14

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

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

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
Reply
#17

would fancy a ZCMD translation.
Reply
#18

Nice work 8/10
Reply
#19

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


Forum Jump:


Users browsing this thread: 1 Guest(s)