[Ajuda] Problema com sscanf.
#1

Boa Tarde.
Eu efetuei um comando de PM, mais quando eu o efetuo, fica dando uma mensagem da funзгo sscanf que eu puis.

Cуdigo;
pawn Код:
CMD:sms(playerid, params[])
{
    new string[128], giveplayerid;
    if(sscanf(params, "us", giveplayerid, texto))
    {
        SendClientMessage(playerid, -1, "{FFFE10}|| INFO ||{FFFFFF} /sms [id] [menssagem]"); /* essa linha fica repetindo, mesmo se eu por o comando corretamente.*/
    }
    else
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerConnected(giveplayerid))
            {
                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);
                    }
                }
            }
            else
            {
                format(string, sizeof(string), "{FF0000}|| ERRO ||{FFFFFF} O ID %d nгo estб online.", giveplayerid);
                SendClientMessage(playerid, -1, string);
            }
        }
        else
        {
            SendClientMessage(playerid, -1, "{FF0000}|| ERRO ||{FFFFFF} Vocк tem que estб logado para usar este comando!");
        }
    }
    return 1;
}
Alguйm pode me ajudar? '-'
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: 2 Guest(s)