Using the same variable twice in a string
#6

pawn Код:
CMD:achat(playerid,params[])
{

    new text[250], pname[24], str[150];
    GetPlayerName(playerid, pname, 24);
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You need to be an rcon admin to use this command.!");
    if(sscanf(params("s[250]", text)) return SendClientMessage(playerid, -1, "USAGE: /achat [ text ]");
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerAdmin(i))
        {
            format(str, 150, "A.Chat: %s[%i]: %s", pname, playerid, text);
            SendClientMessage(i, -1, str);
        }
    }
    return 1;
}
I think this would work, didn't test xd
Reply


Messages In This Thread
Using the same variable twice in a string - by FireShooter10 - 16.08.2013, 20:56
Re: Using the same variable twice in a string - by Edix - 16.08.2013, 21:45
Re: Using the same variable twice in a string - by gtakillerIV - 16.08.2013, 21:49
Re: Using the same variable twice in a string - by Edix - 16.08.2013, 21:53
Re: Using the same variable twice in a string - by andruz99 - 17.08.2013, 09:01
Respuesta: Using the same variable twice in a string - by Strier - 17.08.2013, 09:13

Forum Jump:


Users browsing this thread: 2 Guest(s)