[Ajuda] Problema com sscanf.
#6

pawn Код:
CMD: sms(playerid, params[])
{
    new string[128], giveplayerid;
    if (sscanf(params, "us[64]", giveplayerid, texto)) return SendClientMessage(playerid, -1, "{FFFE10}|| INFO ||{FFFFFF} /sms [id] [menssagem]");
    if (!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, -1, "{FF0000}|| ERRO ||{FFFFFF} Este player nгo estб online.", giveplayerid);
    if (!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "{FF0000}|| ERRO ||{FFFFFF} Vocк tem que estб logado para usar este comando!");
    GetPlayerName(playerid, playername, sizeof(playername));
    GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
    format(string, sizeof(string), "{F4FFB8}SmS{FFFFFF} Enviado para: %s: %s", giveplayername, texto);
    SendClientMessage(playerid, -1, string);
    format(string, sizeof(string), "{F4FFB8}SmS{FFFFFF} Recebido de: %s: %s", playername, texto);
    SendClientMessage(giveplayerid, -1, string);
    PlayerPlaySound(giveplayerid, 1085, 0.0, 0.0, 0.0);
    printf("SmS: %s envio para %s: %s", playername, giveplayername, texto);
    for (new i; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerAdmin(playerid) && LerPms[i] == true)
        {
            format(string, sizeof(string), "{FF8000}|| Admin || %s envio para %s: %s", playername, giveplayername, texto);
            SendClientMessage(i, -1, string);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Problema com sscanf. - by Ley - 06.10.2012, 15:28
Re: Problema com sscanf. - by .FuneraL. - 06.10.2012, 15:36
Re: Problema com sscanf. - by ViniBorn - 06.10.2012, 15:37
Re: Problema com sscanf. - by Ley - 06.10.2012, 15:44
Re: Problema com sscanf. - by .FuneraL. - 06.10.2012, 15:50
Re: Problema com sscanf. - by dPlaYer_ - 06.10.2012, 16:11
Re: Problema com sscanf. - by Ley - 06.10.2012, 17:02
Re: Problema com sscanf. - by ViniBorn - 06.10.2012, 20:23
Re: Problema com sscanf. - by OnlyOne - 06.10.2012, 20:32

Forum Jump:


Users browsing this thread: 1 Guest(s)