07.02.2010, 05:23
Normally
http://forum.sa-mp.com/index.php?topic=144062.0
However this is such a simple one.
or if you don't use dcmd yet(why the hell not) strcmp version
http://forum.sa-mp.com/index.php?topic=144062.0
However this is such a simple one.
pawn Код:
dcmd_me(playerid, params[])
{
new msg[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(msg,sizeof(msg),"** %s(%i): %s",pName,playerid,params);
SendClientMessageToAll(0xFFD720FF,msg);
return 1;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]){
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/component",true) == 0)
{
new msg[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(msg,sizeof(msg),"** %s(%i): %s",pName,playerid,cmdtext);
SendClientMessageToAll(0xFFD720FF,msg);
return 1;
}
.....
}