Mask CMD error
#2

You must use a return true to finish the CMD!

pawn Код:
CMD:mask(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!PlayerInfo[playerid][pMask] == 1) return SendClientMessage(playerid, COLOR_GREY, "You need to buy a mask from a 24/7!.");
    if(PlayerInfo[playerid][pMasked] == 0)
    {
        PlayerInfo[playerid][pMasked] = 1;
        SetPlayerAttachedObject(playerid, 9, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);//You can change this however you want, use sa-mp wiki for more info, right now is HockeyMask2
        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); // ShowPlayerNameTagForPlayer(i, playerid, 0) hide name for all players
        }
    }
    else
    {
        PlayerInfo[playerid][pMasked] = 0;
        SendClientMessage(playerid, COLOR_WHITE, "You have removed your mask!"); // This is message what was send when you remove your mask
        if(IsPlayerAttachedObjectSlotUsed(playerid, 9))
        {
            RemovePlayerAttachedObject(playerid, 9);
            {
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    ShowPlayerNameTagForPlayer(i, playerid, 1); // ShowPlayerNameTagForPlayer(i, playerid, 1) show name back.
                }
            }
            return 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread
Mask CMD error - by Joshman543 - 05.01.2013, 15:10
Re: Mask CMD error - by arakuta - 05.01.2013, 15:14
Re: Mask CMD error - by [HK]Ryder[AN] - 05.01.2013, 15:14

Forum Jump:


Users browsing this thread: 1 Guest(s)