26.07.2013, 23:09
Hey again!
I have been working with the register system on my new script (making a gamemode to learn scripting) and I am using SetSpawninfo on the register and login, so they will spawn at the same position all the time, but then they are also getting the skin changed to the skin I have choosen in SetPlayerSpawn.
I have made "pSkin" and fixed everything, but I cannot just put pSkin instead of the skin in SetSpawnInfo, then it won't work. What shall I do if I want the skin saved. They will spawn with one skin when they register (that would be skin ID0) and when they change their clothes (e.g by the account file that is getting saved) and if they then login, they will spawn with the same skin they had before they quit (except if it got edited in the account file .ini or whatever it's called).
How to do this?
Also
I wrote INI_WriteInt(File,"Cash",5000); (want them to spawn with $5,000 when they are making an account) but it didn't work so I had to add:
Underneath, but that looks a bit stupid. Why isn't it possible to just write it in INI_WriteInt(File,"Cash",0);?
Thanks in advance.
I have been working with the register system on my new script (making a gamemode to learn scripting) and I am using SetSpawninfo on the register and login, so they will spawn at the same position all the time, but then they are also getting the skin changed to the skin I have choosen in SetPlayerSpawn.
I have made "pSkin" and fixed everything, but I cannot just put pSkin instead of the skin in SetSpawnInfo, then it won't work. What shall I do if I want the skin saved. They will spawn with one skin when they register (that would be skin ID0) and when they change their clothes (e.g by the account file that is getting saved) and if they then login, they will spawn with the same skin they had before they quit (except if it got edited in the account file .ini or whatever it's called).
How to do this?
Also
Quote:
case DIALOG_REGISTER: { if (!response) return Kick(playerid); if(response) { if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit"); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Password",udb_hash(inputtext)); INI_WriteInt(File,"Cash",0); |
Quote:
GivePlayerMoney(playerid, 5000); |
Thanks in advance.