SA-MP Forums Archive
Change colour cmd /me - 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: Change colour cmd /me (/showthread.php?tid=177097)



Change colour cmd /me - gondes - 16.09.2010

Hello guys How to change colour cmd /me to colour purple?


Re: Change colour cmd /me - Voldemort - 16.09.2010

Search /me cmd and look for ProxDetector or something like that, and look what color its uses, than go to top, where is defined all colors,a nd choose other color or make your own color


Re: Change colour cmd /me - gondes - 16.09.2010

I don't meet ProxDetector in my script.


Re: Change colour cmd /me - Burridge - 16.09.2010

Most pre-made /me commands are already in purple.

pawn Код:
ProxDetector(30.0, playerid, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
There, if you use ProxDetector. If you haven't got "COLOR_PURPLE" defined, then add the following define to the rest of your colors.

pawn Код:
#define COLOR_PURPLE 0xC2A2DAAA



Re: Change colour cmd /me - gondes - 16.09.2010

@Burridge Where i put ProxDetector?


Re: Change colour cmd /me - Burridge - 16.09.2010

If you have a /me command, post it here, so I can see how it's done, and I'll show you how to put it in.


Re: Change colour cmd /me - gondes - 16.09.2010

SendClientMessage( playerid, WHITE, "---------------------------------------------------------------------------------------------------------------------------------" );

if( Player[playerid][MeActions] >= 100 )
{
format( string, sizeof( string ), "TYPE: /me actions | Executions of /me: %d | Award for: 100 | Status: Achieved.", Player[playerid][MeActions] );
SendClientMessage( playerid, WHITE, string );
}
else
{
format( string, sizeof( string ), "TYPE: /me actions | Executions of /me: %d | Award for: 100 | Status: Unachieved.", Player[playerid][MeActions] );
SendClientMessage( playerid, GREY, string );
}

if( Player[playerid][MeActions] >= 200 )
{
format( string, sizeof( string ), "TYPE: /me actions | Executions of /me: %d | Award for: 200 | Status: Achieved.", Player[playerid][MeActions] );
SendClientMessage( playerid, WHITE, string );
}
else
{
format( string, sizeof( string ), "TYPE: /me actions | Executions of /me: %d | Award for: 200 | Status: Unachieved.", Player[playerid][MeActions] );
SendClientMessage( playerid, GREY, string );
}

SendClientMessage( playerid, WHITE, "---------------------------------------------------------------------------------------------------------------------------------" );
command(me, playerid, params[])
{
new Message[128], string[ 128 ];
if( sscanf( params, "z", Message) )
{
SendClientMessage( playerid, WHITE, "SYNTAX: /me [action]" );
}
else
{

switch( Player[playerid][MeActions] )
{
case 100:
{
SendClientMessage( playerid, WHITE, "You have unlocked a new achievement!" );
SendClientMessage( playerid, GREY, "You have executed 100 /me actions." );
Player[playerid][AchievementRank]++;
}
case 200:
{
SendClientMessage( playerid, WHITE, "You have unlocked a new achievement!" );
SendClientMessage( playerid, GREY, "You have executed 200 /me actions." );
Player[playerid][AchievementRank]++;


Re: Change colour cmd /me - gondes - 16.09.2010

Please help me


Re: Change colour cmd /me - Burridge - 16.09.2010

I see no actual /me functions in there. To me that looks like a system for counting how many /me's you've done.

pawn Код:
COMMAND:me(playerid, params[]) //me command
{
    new Me[128], text2[128];
    if(GetPVarInt(playerid, "Muted") == 1) return SendClientMessage(playerid,RED,"You can't talk because you are muted");
    if(sscanf(params,"s",text2)) return SendClientMessage(playerid,0xFF0000AA,"USAGE: /me [Action]");
    format(Me, sizeof(Me), "*%s %s", Name(playerid), text2);
    ProxDetector(30.0, playerid, Me, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
    printf("%s", Me);
    return 1;
}
This is my server's /me command. It's quite a lot different to yours. Look at mine, and see if you can make yours use ProxDetector.