27.02.2014, 11:02
(
Последний раз редактировалось PrivatioBoni; 27.02.2014 в 11:03.
Причина: Typo in title
)
My code:
To me, the script looks fine but it majorly truncates. Here is an example:
(NOTE: This happens to some other commands too, but any help I receive with this, I can apply to the other commands. )
Thanks in advance.
pawn Код:
CMD:pm(playerid, params[])
{
new str[144];
new str2[144];
new id;
if(sscanf(params, "us", id, str2)) return SendClientMessage(playerid, COLOR_RED, "Syntax: /pm [name/playerid] [message]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "Error: Invalid ID/player name.");
{
format(str, sizeof(str), "%s(ID %d): %s", GetName(id), id, str2);
SendClientMessage(playerid, COLOR_YELLOW, str);
format(str, sizeof(str), "%s(ID %d): %s", GetName(playerid), playerid, str2);
SendClientMessage(id, COLOR_ORANGE, str);
}
return 1;
}
(NOTE: This happens to some other commands too, but any help I receive with this, I can apply to the other commands. )
Thanks in advance.