SA-MP Forums Archive
Help With SetPlayerColor! - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help With SetPlayerColor! (/showthread.php?tid=164176)



Help With SetPlayerColor! - soulas85 - 30.07.2010

Hi, i've set that then player pickups job, his name color changes, but after reconnect or restart, his name color is again as newbie! What i Did Wrong?! Where should i Put SetPlayerColor Code that After Relog they still has their name Colored!?


Re: Help With SetPlayerColor! - Ash. - 30.07.2010

You need to save that players colour when they login/disconnect, and then call the players color from file when they reconnect/login again.

(Save the colour to file, then call the colour code/name back into the script on connection)

No Problem


Re: Help With SetPlayerColor! - soulas85 - 30.07.2010

How can i do that?


Re: Help With SetPlayerColor! - Ash. - 30.07.2010

With DINI, or something even more basic if you dont know how. You could use dini to create a "colour.ini" file, and save the players name with their color, then fetch their name and colour line from that file, and use SetPlayerColour to set the players colour - Or just make them keep selecting that job again and again?


Re: Help With SetPlayerColor! - soulas85 - 30.07.2010

Could you write exactly what i need to write? How i need to do the connection Between colour.ini and MY Gamemode Saves? Maybe you could create for me?


Re: Help With SetPlayerColor! - Ash. - 30.07.2010

I dont do much with Dini unfortunately, i just know that it can be done that way

I could have a try though Give me about 10 mins


Re: Help With SetPlayerColor! - Ash. - 30.07.2010

*Could you please post the script with the pickups in, so i can fetch the player colours etc

Thanks
Ash


Re: Help With SetPlayerColor! - FireCat - 30.07.2010

you need to

make a .ini file and make it read from file ... .ini

then make a code that makes it save
like its hard to xplain

make like a admin script

admin have red colour's that what you need doenload luxadmin and see their code that helped me


Re: Help With SetPlayerColor! - Ash. - 30.07.2010

I said all that lol :S


Re: Help With SetPlayerColor! - soulas85 - 30.07.2010

can someone help me to do it? I can send whole server if someone could do it?