Spawn help?
#1

Hi. I'm having two issues. I'm sure I'm being blonde as always and it's a simple fix. Anyways; on my DIALOG_LOGIN (in my dialogresponse) I want the player to spawn at their saved location. I'm using SetSpawnInfo, however in the skin part I'm not quite sure what to put. Because I want it to be whatever skin the player selects. This is what my code looks like

Код:
	if(dialogid == DIALOG_LOGIN) //If dialog id is a login dialog
	{//then
	    if(!response) return Kick(playerid); //If they clicked the second button "Quit", we will kick them.
		if(response) //if they clicked the first button "Register"
		{//then
			new hashpass[129]; //Will create a new variable to hash his/her password
			WP_Hash(hashpass,sizeof(hashpass),inputtext); //Will hash inputted password
			if(!strcmp(hashpass, pInfo[playerid][Password], false)) //If they have insert their correct password
			{//then
                INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);//We will load his account's data from user's path
                TogglePlayerSpectating(playerid, false);
                SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid); //We're using this for other purposes, to fix a bug in skin selection (OnPlayerRequestClass)
                Logged[ playerid ] = 1; //giving the 1 ("true") value to our variable "Logged"
				GivePlayerMoney(playerid,pInfo[playerid][Money]);//We will get their Money inside of his user's account and we will set it here
				SetSpawnInfo(playerid, 0 /*Because the player has no team*/, 0, pInfo[playerid][pPos_x], pInfo[playerid][pPos_y], pInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1); //Sets the player's spawn information
				SCM(playerid, COLOR_YELLOW, "You have successfully logged in. Please enjoy your stay!");
    		}
			else //If they've entered an incorrect password
			{//then
				ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","{FFFFFF}Welcome back. This account is {FF0000}registered{FFFFFF}!. \nInsert your password to {0000FF}login{FFFFFF} to your account.\nIncorrect password!","Login","Quit");//We will tell to them that they've entered an incorrect password
                return 1;
			}
		}
	}
No I don't get any errors or anything.

However my next question or help needing is when I go into the server and login, I see next, previous and spawn however I don't see the images of the skins. I will post my gamemode on here if I need to but I'm just hoping someone will be able to tell me what's wrong straight away.

Thanks for your time and as always whom ever helps gets +1 Rep.
Reply


Messages In This Thread
Spawn help? - by Tass007 - 15.07.2016, 01:25
Re: Spawn help? - by DarkSkull - 15.07.2016, 06:38
Re: Spawn help? - by gurmani11 - 15.07.2016, 06:47
Re: Spawn help? - by Tass007 - 15.07.2016, 06:50
Re: Spawn help? - by gurmani11 - 15.07.2016, 06:55
Re: Spawn help? - by Tass007 - 15.07.2016, 06:57
Re: Spawn help? - by gurmani11 - 15.07.2016, 07:08
Re: Spawn help? - by Tass007 - 15.07.2016, 07:22

Forum Jump:


Users browsing this thread: 1 Guest(s)