04.08.2011, 08:05
Warning: Strings without a length are deprecated, please add a destination of size.
Warning is Printed On the server Console .
pawn Код:
dcmd_pm(playerid,params[])
{
new id,message[128],string[128],name[MAX_PLAYER_NAME];
if(sscanf(params,"us",id,message)) SendClientMessage(playerid,0x00FF00AA,"Usage: /pm [id] [Message]");
else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,0x00FF00AA,"Player Not Connected");
else {
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"PM From %s (%i) -%s",name,playerid,message);
SendClientMessage(id,0x00FF00AA,string);
}
return 1;
}