SA-MP Forums Archive
/me command help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /me command help (/showthread.php?tid=349637)



/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]);