Help with colors
#1

Hello guys, can you give me the command witch changes the player color when the player spawns? like /spawncolor 0xFFFFFFFF but when I type it, it saves with dini and to OnPlayerConnect it loads than OnPlayerSpawn -> SetPlayerColor(playerid,SavedColor);
Reply
#2

I have just created one, but when it loads the error:
Quote:

error 035: argument type mismatch (argument 2)

appears!
Quote:

new ColorString[256];
ColorString = dini_Get(string, "Color");
Line with the error: SetPlayerColor(playerid,ColorString);

Reply
#3

You have error becouse argument color in SetPlayerColor is not string. https://sampwiki.blast.hk/wiki/Function:SetPlayerColor read this.
Reply
#4

I know it, but how to save it with dini?
Reply
#5

Use sscanf and %x for hex.
Reply
#6

I will try to save it using dini_Int, not dini_Get with using decimal notation
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)