Jump to content

Santa Hat system


StarRo
 Share

Recommended Posts

                             Tocmai m-am gandit sa fac un sistem de santa hat si am reusit .

 

Defineuri:

 

 

#define HAT_TYPE_1              0
#define HAT_TYPE_2              1

Stock-ul :

stock GiveChristmasHat(playerid,number)
{
switch(number)
{
case HAT_TYPE_1:
{
   RemovePlayerAttachedObject(playerid,1);
   SetPlayerAttachedObject(playerid, 1, 19065, 15, -0.025, -0.04, 0.23, 0, 0, 270, 2, 2, 2);
}
case HAT_TYPE_2:
{
RemovePlayerAttachedObject(playerid,1);
SetPlayerAttachedObject(playerid, 1, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
}
}
}

Comanda :

 
CMD:hat(playerid,params[])
{
new hat;
if(sscanf(params,"i",hat)) return SendClientMessage(playerid,COLOR_RED,"Usage: /hat [0/1]");
if(hat < 0 || hat > 1) return SendClientMessage(playerid,COLOR_RED,"Invalid value");
GiveChristmasHat(playerid,hat);
SendClientMessage(playerid,COLOR_ORANGE,"You've now a(n other) christmashat.");
return 1;
}
 

 
 
Edited by StarRo
Link to comment
Share on other sites

Pur si simplu puneai doar comanda, merge fara toate alea:

CMD:santa (playerid, params[])
    {
        SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
        return SendClientMessage(playerid, 0x00FF00FF, "Staff-ul XXX va ureaza Sarbatori fericite!");
    }
 CMD:remove (playerid, params[])
    {
        if(IsPlayerAttachedObjectSlotUsed(playerid, 3))
        {
            RemovePlayerAttachedObject(playerid, 3);
            SendClientMessage(playerid, 0x00FF00FF, "Staff-ul XXXX va ureaza Sarbatori fericite!");
        }
        return 1;
    }
Edited by Kasian
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.