Christmas Hat
#1

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

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);
Reply
#3

Not Works
Reply
#4

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!
Reply
#5

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

Type this under OnPlayerConnect

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

Its spawns on our head for like 2 seconds then disappears
Reply
#8

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

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

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

IP : 212.7.208.70:7777
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)