How to add toys in command
#1

DELETED
Reply
#2

pawn Код:
CMD:mask(playerid, params[])
{
    if(PlayerInfo[playerid][pLevel] == 0)
    if(isStranged[playerid] == 0)
    {
        new randomID = random(200);
        new string[35];
        isStranged[playerid] = true;
        GetPlayerName(playerid, string, sizeof(string));
        strmid(OldUsername[playerid], string, 0, strlen(string), 64);
        format(string,sizeof(string), "Stranger", randomID);
        SetPlayerName(playerid, string);
        SetPlayerAttachedObject(playerid, 1, 19036, 2, 0.107, 0.020, 0.0, 90, 90, 0);//You can change this however you want, use sa-mp wiki for more info, right now is HockeyMask1
        SendClientMessage(playerid, COLOR_WHITE, "You have put on a mask! (/mask to romove it)");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            ShowPlayerNameTagForPlayer(i, playerid, 0);
        }
    }
    else
    {
        SetPlayerName(playerid, OldUsername[playerid]);
        isStranged[playerid] = false;
        SendClientMessage(playerid, COLOR_WHITE, "You have removed your mask!");
        RemovePlayerAttachedObject(playerid, 1)//If you change the index for the mask make sure you change here too
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            ShowPlayerNameTagForPlayer(i, playerid, 1);
        }
    }
    return 1;
}
Reply
#3

well i dont know of a tutorial but i do know
https://sampwiki.blast.hk/wiki/SetPlayerAttachedObject
is gonna be needed,
youll have to get the mask model id and use the "bone id" of head

give it a try if you still need help post back and ill assist you more.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)