05.08.2010, 15:15
anyone have a clue how can i make like a /me command or something?like this
_______________________
[GDZ]leader
_______________________
[GDZ]leader
if(!strcmp(cmdtext, "/me", true, 3))
{
if(cmdtext[3] == 0)
{
SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
return 1;
}
new str[128], Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
format(str, sizeof(str), "* %s %s", Name, cmdtext[4]);
SendClientMessageToAll(GetPlayerColor(playerid), str);
return 1;
}
CMD:me(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFFF, "/me [text]");
new string[128],pName[20 char];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "* %s %s *", pName, params);
return SendClientMessageToAll(0xFFFFFFFF, string);
}
if(!strcmp(cmdtext, "/me", true))
{
if(cmdtext[4] == ' ') return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
new str[128], Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
format(str, sizeof(str), "* %s %s", Name, cmdtext[4]);
SendClientMessageToAll(GetPlayerColor(playerid), str);
return 1;
}