Need help with /color.
#1

I want to make a /color command which will save the color in R-G-B format, so we can save it and load it on connect messages..

RGB -> HexCodes -> ConnectMessage..

I'm using Y_INI saving system.

Any help would be appreciated!
Reply
#2

Hmmm, to save the color depends of you because only you knows what's in your script
I hope this will help you!

pawn Код:
#define RGBCOLOR(%1,%2,%3,%4) (((((%1) & 0xff) << 24) | (((%2) & 0xff) << 16) | (((%3) & 0xff) << 8) | ((%4) & 0xff)))

// Example //

SetPlayerColor( playerid, RGBCOLOR( random( 235 ) + 20, random( 235 ) + 20, random( 235 ) + 20, 90 ) );
REGARDS
Reply
#3

Use this include
https://sampforum.blast.hk/showthread.php?tid=71259

It already have like 100+ colors.
Why you want to save in RGB Format?
Reply
#4

I don't any colors for my gamemode. I want to make a command /color <R> <G> <B> so it can save the color, it will be converted into Hex Codes (which the SA-MP system can understand) and then it will be used in connect messages:

<His saved color>%s has joined the server.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)