/me command
#7

Quote:

#include <a_samp>
#include <dudb>

public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new cmd[256];
new tmp[256];
new sendername[MAX_PLAYER_NAME];
new idx;
cmd = strtok(cmdtext, idx);
if(!strcmp(cmd, "/me",true) || !strcmp(cmd, "/eu",true))
{
new dir[256];
dir = strtok(cmdtext, idx);
strmid(tmp, cmdtext, 4, strlen(cmdtext));
if(!strlen(dir))
{
SendClientMessage(playerid,0xFFFF00AA,"[USAGE]> /me [Message/Action]");
return 1;
}
dir = strtok(cmdtext, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "==> %s %s", sendername, tmp);
SendClientMessageToAll(0xFFFF00AA,string);
print(string);
return 1;
}
return 0;
}

Reply


Messages In This Thread
/me command - by Crezy-Boy - 16.06.2010, 14:17
Re: /me command - by Lajko1 - 16.06.2010, 14:22
Re: /me command - by Crezy-Boy - 16.06.2010, 14:26
Re: /me command - by MadeMan - 16.06.2010, 14:27
Re: /me command - by WSD - 16.06.2010, 16:22
Re: /me command - by Flashy - 16.06.2010, 16:30
Re: /me command - by hab2ever - 16.06.2010, 16:49

Forum Jump:


Users browsing this thread: 1 Guest(s)