06.11.2010, 23:19
Using sscanf and zcmd it would look like this:
pawn Код:
CMD:facepalm(playerid, params[])
{
new
otherid,
oName[MAX_PLAYER_NAME],
string[64]
;
if (!IsPlayerAdmin(playerid)) return 0; // Checks if player is logged in with rcon
if(sscanf(params, "u", otherid)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /facepalm [id]");
GetPlayerName(playerid, oName, sizeof(oName)); // Get the player name
format(string, sizeof(string), "(FACEPALM) %s The doctor has detected a failz0r!", oName);
SendClientMessageToAll(somecolor, string); // Sends this ^^ message to all
return 1;
}