SA-MP Forums Archive
Help with colors - 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)
+--- Thread: Help with colors (/showthread.php?tid=640230)



Help with colors - Kraeror - 30.08.2017

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);


Re: Help with colors - Kraeror - 30.08.2017

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);




Re: Help with colors - Lbaker - 30.08.2017

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


Re: Help with colors - Kraeror - 30.08.2017

I know it, but how to save it with dini?


Re: Help with colors - Lbaker - 30.08.2017

Use sscanf and %x for hex.


Re: Help with colors - Kraeror - 30.08.2017

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