29.03.2014, 10:27
Quote:
thats because the string in which message is storing is too short increase its size of the string in which u are storing pm message
|
Edit:
this is the cmd
pawn Код:
CMD:pm(playerid, params[])
{
new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
if(sscanf(params, "us", id, str2))
{
SendClientMessage(playerid, -1, "USE: {FFFF00}/pm {FFFFFF}<id> <message>");
return 1;
}
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, red,"ERROR: {FFFFFF} Player not connected");
if(playerid == id) return SendClientMessage(playerid, red,"ERROR: {FFFFFF} You cannot pm yourself!");
{
GetPlayerName(playerid, Name1, sizeof(Name1));
GetPlayerName(id, Name2, sizeof(Name2));
format(str, sizeof(str), "PM To %s [ID %d]: %s", Name2, id, str2);
SendClientMessage(playerid, yellow, str);
format(str, sizeof(str), "PM From %s [ID %d]: %s", Name1, playerid, str2);
SendClientMessage(id, yellow, str);
}