[ SOLVED ] - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [ SOLVED ] (
/showthread.php?tid=91298)
[ SOLVED ] -
zombie13333 - 13.08.2009
[ SOLVED ]
Thanks again !
Re: SendClientMessageToAll [ Help ] -
hannovd - 13.08.2009
I think you can solve it this way..
you are using pre-defined variables like: COLOR_JOB_CITIZEN
When you do this:
pawn Код:
Color_Return = "COLOR_JOB_ANARCHIST"
You're filling COLOR_Return with a string, and since COLOR_JOB_ANARCHIST is a variable, you'll have to do it like this:
pawn Код:
Color_Return = COLOR_JOB_ANARCHIST; //without the quotes
<-- without the "" "" "" " quoties
Re: SendClientMessageToAll [ Help ] -
RaFsTar - 13.08.2009
Instead of defining all jobs/colors, just make a GetPlayerColor.
Example:
Код:
if(strcmp(cmdtext, "/me", true, 3) == 0)// 3 is the length of /me
{
if(!strlen(cmdtext[3])) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
GetPlayerName(playerid, string, sizeof(string));
format(string, sizeof(string), "[ ! ] %s : %s", string, cmdtext[4]);
SendClientMessageToAll(GetPlayerColor(playerid), string);
return 1;
}
Re: SendClientMessageToAll [ Help ] -
zombie13333 - 14.08.2009
lol, RaFsTaR ... Why didn't I think of that !?