Quote:
Originally Posted by RealCop228
This is directly from my GM. You can edit/add things if you want.
pawn Код:
CMD:pm(playerid, params[]) { new iID, szMessage[80]; if(sscanf(params, "us[79]", iID, szMessage)) return SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /pm [nick/id] [message]"); if(iID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Invalid nickname/ID.");
new szString[128] ; format(szString, sizeof(szString), "PM from %s(%d): %s", getName(playerid), playerid, szMessage); SendClientMessage(iID, COLOR_YELLOW, szString); format(szString, sizeof(szString), "PM to %s(%d): %s", getName(iID), iID, szMessage); SendClientMessage(playerid, COLOR_YELLOW, szString); return 1; }
|
But I don't use scanff. If I put it on my GM, what the possibilities of getting a bug or code-confucion?