/me command help -
[LSG]Lil_Familie - 09.06.2012
everyone on the server can see when someone types in a /me and i want that only the ppl in range of the player can see it
Re: /me command help -
jamax - 09.06.2012
code?
AW: /me command help -
[LSG]Lil_Familie - 09.06.2012
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFEFEFEFF, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
SendClientMessageToAll(0xFFFF00AA, str);
return 1;
}
Re: /me command help -
NeroX98 - 09.06.2012
You have SendClientMessageToAll, change that to SendClientMessage only...
Try with this...
Код:
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFEFEFEFF, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
SendClientMessage(0xFFFF00AA, str);
return 1;
}
REP + If i helped you
AW: /me command help -
JhnzRep - 09.06.2012
https://sampforum.blast.hk/showthread.php?tid=336052
Use this.
Re: /me command help -
varga - 09.06.2012
it is my code
if(strcmp(cmdtext, "/me", true, 3)==0)
{
new pname1[24], string[256];
GetPlayerName(playerid, pname1, 24);
format(string, 256, "{762B76}*** {FFFFFF}%s {762B76}%s", pname1, cmdtext[4]);
SendClientMessageToAll(0xFFFFFFAA , string);
return 1;
}
Re: /me command help -
jamax - 09.06.2012
use
Код:
it is my code
if(strcmp(cmdtext, "/me", true, 3)==0)
{
new pname1[24], string[256];
GetPlayerName(playerid, pname1, 24);
format(string, 256, "{762B76}*** {FFFFFF}%s {762B76}%s", pname1, cmdtext[4]);
SendClientMessage(0xFFFFFFAA , string);
return 1;
}
AW: Re: /me command help -
[LSG]Lil_Familie - 09.06.2012
Quote:
Originally Posted by NeroX98
You have SendClientMessageToAll, change that to SendClientMessage only...
Try with this...
Код:
if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
{
if(!cmdtext[3])return SendClientMessage(playerid, 0xFEFEFEFF, "USAGE: /me [action]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
SendClientMessage(0xFFFF00AA, str);
return 1;
}
REP + If i helped you
|
if i do that i get an error it says Type mismatch
Re: /me command help -
varga - 09.06.2012
it is 100% working but you can change the colors i mean usethis way (using only one color) :
if(strcmp(cmdtext, "/me", true, 3)==0)
{
new pname1[24], string[256];
GetPlayerName(playerid, pname1, 24);
format(string, 256, "{762B76}*** %s %s", pname1, cmdtext[4]);
SendClientMessage(0xFFFFFFAA , string);
return 1;
}
AW: /me command help -
[LSG]Lil_Familie - 09.06.2012
i always get errors cus of this line:
format(string, 256, "{762B76}*** %s %s", pname1, cmdtext[4]);