Question
#2

Quote:
Originally Posted by anassmaroc
Посмотреть сообщение
Hi all. i Have a Question How to make a Command for RGB Colors Like /mycolor [R] [G] [B].
IF i Quit the Server and Come back again the RGB Color stay and to remove it /resetcolor to back the Normal color
Please Help iwill +rep
Hello.
You've to store player's color when they leave in some external place (e.g. file or in database) and then load it up when player connects. That's pretty much it.

And about /mycolor ® (g) (b). It's pretty easy to do:
pawn Код:
COMMAND:mycolor( playerid, params[] ){
    new
        Red, Green, Blue ;
    if( sscanf(params, "ddd", Red, Green, Blue) ) {
        SendClientMessage( playerid, -1, "Use: /mycolor R G B");
        return 1;
    }
    if( ( Red >= 0 && Green >= 0 && Blue >= 0 ) && ( Red <= 255 && Green <= 255 && Blue <= 255 ) ) {
        new mixedColor = 0;
        mixedColor = (Red << 24) + (Green << 16) + (Blue << 8) + 255;
       
        SetPlayerColor( playerid, mixedColor );
        SendClientMessage( playerid, -1, "Done!");
        return 1;      
    } else {
        SendClientMessage( playerid, -1, "Error: one or more channels are out of bounds (0<>255)");
        return 1;
    }
}
Greetings.
Reply


Messages In This Thread
RGB Colors Help +rep - by anassmaroc - 18.08.2015, 10:20
Re: Question - by LetsOWN[PL] - 18.08.2015, 10:38
Re : Re: Question - by anassmaroc - 18.08.2015, 10:49
Re : Question - by anassmaroc - 18.08.2015, 18:33
Re: Question - by ZToPMaN - 18.08.2015, 18:42
Re : Re: Question - by anassmaroc - 18.08.2015, 18:44
Re : Question - by Dutheil - 18.08.2015, 18:46
Re: Question - by ZToPMaN - 18.08.2015, 18:51
Re : Question - by anassmaroc - 18.08.2015, 18:53
Re : Question - by anassmaroc - 19.08.2015, 09:47

Forum Jump:


Users browsing this thread: 2 Guest(s)