pls help me with my string :)
#6

Quote:
Originally Posted by sizeof(Sky));
I'll write out the command, give me two minutes, and i'll edit the post.

pawn Код:
cmd(afk, playerid, params[])
{
    new string[128], name[MAX_PLAYER_NAME], minute, reason[128];
    if(!sscanf(params, "is", minutes, reason))
    {
      GetPlayerName(playerid, name, sizeof(name));
      format(string,sizeof(string),"%s is away from keyboard for %d minutes (Reason: %s)",name,minutes,reason);
      SendClientMessageToAll(0xFF0000AA,string);
    }
    else return SendClientMessage(playerid,0xFF0000AA,"Usage: /afk <minutes> <reason>");
    return 1;
}
The new thing that you done wrong: Could be the %i in the format.

Yours:
pawn Код:
%i
Correct:
pawn Код:
%d
:P
Reply


Messages In This Thread
pls help me with my string :) - by KIDUL - 10.11.2009, 14:58
Re: pls help me with my string :) - by KIDUL - 10.11.2009, 16:04
Re: pls help me with my string :) - by (.Aztec); - 10.11.2009, 16:06
Re: pls help me with my string :) - by KIDUL - 10.11.2009, 16:12
Re: pls help me with my string :) - by KIDUL - 10.11.2009, 16:23
Re: pls help me with my string :) - by oncedead - 10.11.2009, 16:31

Forum Jump:


Users browsing this thread: 4 Guest(s)