Can u edit this?
#1

Quote:
Originally Posted by [HK]Ryder[AN]
Посмотреть сообщение
try this
pawn Код:
new GiveMask[MAX_PLAYERS]; // Top of script
new MaskOn[MAX_PLAYERS]; // Top of script

//Commands can be anywhere except not in call backs like OnPlayerCommandText, or OnPlayerSpawn.

CMD:givemask(playerid, params[])
{
    new targetid;
    if(IsPlayerAdmin(playerid))
    {
        if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "USAGE: /givemask [playerid]");
        else if(targetid == INVALID_PLAYER_ID) SendClientMessage(playerid, -1, "Player not online !");
        else
        {
            if(GiveMask[targetid] == 1)
            {
                SendClientMessage(playerid, -1, "Player already has a mask!");
            }
            else
            {
                GiveMask[targetid] = 1;
            }
        }
    }
    else return SendClientMessage(playerid, -1, "You're not authorized to use this command !");
    return 1;
}

CMD:mask(playerid, params[])
{
    if(GiveMask[playerid] == 1)
    {
        if(MaskOn[playerid] == 0)
        {
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    ShowPlayerNameTagForPlayer(i, playerid, 0);
                }
            }
            MaskOn[playerid] = 1;
            SendClientMessage(playerid, 1, "* You've put your mask on!");
        }
        else if(MaskOn[playerid] == 1)
        {
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    ShowPlayerNameTagForPlayer(i, playerid, 1);
                }
            }
            SendClientMessage(playerid, 1, "* You've put your mask off!");
            MaskOn[playerid] = 0;
        }
    }
    return 1;
}
When people talk in /b or /s or /l or anything their name still, it's not changed to Stranger..
Can you edit it?
Reply


Messages In This Thread
Help Please. - by Antonioh - 08.01.2013, 21:11
Re: Can u edit this? - by RedCrossER - 08.01.2013, 21:14
Re: Can u edit this? - by Antonioh - 08.01.2013, 21:15

Forum Jump:


Users browsing this thread: 1 Guest(s)