[HELP]In Making a Color system that Uses Y_Ini
#1

i need help in making a Colour system that uses Y_ini and Saves the Skins
And when the guy rejoins he get the same Players name Colour?

i know how to make a Colour system but i dont know how to make it saves the Color and load it On Re connect
the Colour saving should be automatic when a player uses /mycolor and chooses a the colour it automaticly saves the file in .ini Document and when player rejoin He set's his colour according to the one found in the.ini File
Reply
#2

Bump! Anyone please help?
Reply
#3

I can't understand the Y_INI, but you need to use this, I think.

Code:
new playercolor; //variable for store the player's color
INI_WriteHex(filename[], "color", GetPlayerColor(playerid)); //to write the color.. You need to use SetPlayerColor, before get the players color with this function
INI_Hex("color", playercolor); //to read the color from file
SetPlayerColor(playerid, playercolor); //to set the player's color back.
I think, its work.
Reply
#4

Hexadecimals become integers when assigned to a variable


pawn Code:
new variable = 0xFF0000FF
printf("variable = %d",variable);
will print
Code:
variable = 4278190335
So you can just set it to a variable and save it as an integer
Reply
#5

Thnx To Both of you Now i can Make it repped You both
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)