25.01.2014, 18:27
Hey
error:
PHP код:
command(pm, playerid, params[])
{
new string[200], message[200], id;
if(sscanf(params, "uz", id, message))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /pm [playerid] [message]");
}
else
{
if(IsPlayerConnectedEx(id))
{
if(strlen(message) >= 1)
{
if(Player[id][PMsEnabled] == 1)
{
if(Player[id][AFKStat] == 1)
{
SendClientMessage(playerid, WHITE, "This administrator is away from keyboard, right now.");
}
else
{
format(string, sizeof(string), "[PM] You have sent %s: %s ", RemoveUnderScore(id), message);
SendClientMessage(playerid, PLAYERCOM, string);
format(string, sizeof(string), "[PM] from %s (ID: %d): %s ", RemoveUnderScore(playerid), playerid, message);
SendClientMessage(id, PLAYERCOM, string);
format(string, sizeof(string), "PM from [%d]%s to [%d]%s: %s", playerid,RemoveUnderScore(playerid),id,RemoveUnderScore(id),message);
SendPMMessage(RED, string);
PMsLog(string);
}
}
else
{
SendClientMessage(playerid, WHITE, "That player has disabled PMs!");
}
}
else
{
SendClientMessage(playerid, WHITE, "SYNTAX: /pm [playerid] [message]");
}
}
else
{
SendClientMessage(playerid, WHITE, "That player is not connected or isn't logged in.");
}
}
return 1;
}
Код HTML:
[19:51:39] sscanf warning: 'z' is deprecated, consider using 'S' instead. [19:51:39] sscanf warning: No default value found. [19:51:39] sscanf warning: Strings without a length are deprecated, please add a destination size. [19:51:39] sscanf warning: String buffer overflow.