Help Please With PM Command
#1

Here is my code...
pawn Код:
dcmd_pm(playerid, params[]) {
    new id, message[256];
    if(sscanf(params, "is", id, message)) SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /pm [playerid] [message]");
    else {
        if(id == playerid) SendClientMessage(playerid, 0xFF0000FF, "You can't send a private message to yourself.");
        else {
            new output1[256], output2[256], name1[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME];
            GetPlayerName(playerid, name1, sizeof(name1));
            GetPlayerName(id, name2, sizeof(name2));
            format(output1, sizeof(output1), "PM To %s(%i): %s", name2, id, message);
            format(output2, sizeof(output2), "PM From %s(%i): %s", name1, playerid, message);
            SendClientMessage(playerid, 0x00FFFFFF, output1);
            SendClientMessage(id, 0x00FFFFFF , output2);
        }
    }
    return 1;
}
Compiles Fine...
Works Fine...

But... Gives Me This In The Console
Quote:

sscanf warning: Strings without a length are deprecated, please add a destination size.

What Can I Do To Fix This?

Yes I Like Periods
Reply


Messages In This Thread
Help Please With PM Command - by Tim_Ethen - 12.11.2010, 02:20
Re: Help Please With PM Command - by (SF)Noobanatior - 12.11.2010, 03:08
Re: Help Please With PM Command - by Larsey123IsMe - 12.11.2010, 03:18
Re: Help Please With PM Command - by Miguel - 12.11.2010, 06:02

Forum Jump:


Users browsing this thread: 1 Guest(s)