Random numbers for the mask
#1

How can you create some random numbers in this mask code... Like stranger [number]

pawn Код:
CMD:mask(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(Masked[playerid] == false)
        {
            new pname[24];
            GetPlayerName(playerid, pname, sizeof(pname));
            Masked[playerid] = true;
            strmid(OldName[playerid], pname, 0, strlen(pname), 64);
            SetPlayerName(playerid, "The Stranger");
            SendClientMessage(playerid, COLOR_GREEN, "* You have put on your mask.");
            for(new i=0;i<MAX_PLAYERS;i++)
            {
                ShowPlayerNameTagForPlayer(i, playerid, 0);
            }
        }
        else
        {
            SetPlayerName(playerid, OldName[playerid]);
            Masked[playerid] = false;
            SendClientMessage(playerid, COLOR_GREEN, "* You have removed your mask.");
            for(new i=0;i<MAX_PLAYERS;i++)
            {
                ShowPlayerNameTagForPlayer(i, playerid, 1);
            }
        }
    }
    return 1;
}
+rep if you helped me!
Reply


Messages In This Thread
Random numbers for the mask - by lulo356 - 31.05.2014, 00:47
Re: Random numbers for the mask - by SilentSoul - 31.05.2014, 00:50
Re: Random numbers for the mask - by lulo356 - 31.05.2014, 00:56
Re: Random numbers for the mask - by lulo356 - 31.05.2014, 01:07
Re: Random numbers for the mask - by Tayab - 31.05.2014, 01:43

Forum Jump:


Users browsing this thread: 1 Guest(s)