24.02.2013, 07:45
Quote:
pawn Код:
|
pawn Код:
CMD:me(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /me [action]"); //This would be detecting, if the player types nothing, it will return him the ClientMessage stated above.
new str[500], pName[MAX_PLAYER_NAME]; //The text the player will type, and the player name..
GetPlayerName(playerid, pName, sizeof(pName)); //This gets the player name...
format(str, sizeof(str), " * %s %s", pName, params); //This format gets what the player types
SendNearbyMessage(playerid, 15, str, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);// and here it sends the string
return 1;
}
pawn Код:
CMD:b(playerid, params[])
{
new string[128];
if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /b [text] (Local OOC Chat)");
GetPlayerName(playerid, pName, sizeof(pName)); //This gets the player name...
format(string, sizeof(string), "%s: (( %s ))", pName, params); //This format gets what the player types
SendNearbyMessage(playerid, 10, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
return 1;
}