wont spawn if will login
#1

Hey,i want to make,if player will login,he/she will spawn,i added SpawnPlayer(playerid); but it dosent work,i dont know why

heres the code

Код:
	if(dialogid == LOGIN)
	{
	  if(response == 1)
	  {
	    new pass_confirm[256];
	    pass_confirm = dini_Get(file, "Password");
	    if(strcmp(encrypt(inputtext), pass_confirm, true) == 0)
	    {
	      PlayerInfo[playerid][Logged] = 1;
	      SendClientMessage(playerid, GREEN, "Successfully logged in!");
	      #if POSITION == 1
        if(dini_Float(file, "X") == 0 && dini_Float(file, "Y") == 0 && dini_Float(file, "Z") == 0) return 1;
				SetPlayerPos(playerid, dini_Float(file, "X"), dini_Float(file, "Y"), dini_Float(file, "Z"));
				SetPlayerFacingAngle(playerid, dini_Float(file, "A"));
				SetPlayerInterior(playerid, dini_Int(file, "Int"));
				#endif
				#if FACTIONS == 1
				PlayerInfo[playerid][Faction] =(playerid, dini_Int(file, "Cash"));
				#endif
				#if CASH == 1
				GivePlayerMoney(playerid, dini_Int(file, "Cash"));
				#endif
				#if SKIN == 1
				SetPlayerSkin(playerid, dini_Int(file, "Skin"));
				SpawnPlayer(playerid);
				#endif
				#if SCORE == 1
				SetPlayerScore(playerid, dini_Int(file, "Score"));
				#endif
				#if WEAPONS == 1
				GivePlayerWeapon(playerid, dini_Int(file, "Wep1"), dini_Int(file, "Ammo1"));
				GivePlayerWeapon(playerid, dini_Int(file, "Wep2"), dini_Int(file, "Ammo2"));
				GivePlayerWeapon(playerid, dini_Int(file, "Wep3"), dini_Int(file, "Ammo3"));
				GivePlayerWeapon(playerid, dini_Int(file, "Wep4"), dini_Int(file, "Ammo4"));
				GivePlayerWeapon(playerid, dini_Int(file, "Wep5"), dini_Int(file, "Ammo5"));
				GivePlayerWeapon(playerid, dini_Int(file, "Wep6"), dini_Int(file, "Ammo6"));
				GivePlayerWeapon(playerid, dini_Int(file, "Wep7"), dini_Int(file, "Ammo7"));
				#endif
				#if HEALTH == 1
				SetPlayerHealth(playerid, dini_Float(file, "Health"));
				#endif
				#if ARMOUR == 1
				SetPlayerArmour(playerid, dini_Float(file, "Armour"));
				#endif
				#if DRUNK_LEVEL == 1
				SetPlayerDrunkLevel(playerid, dini_Int(file, "DrunkLevel"));
				#endif
				#if FIGHT_STYLE == 1
				SetPlayerFightingStyle(playerid, dini_Int(file, "FightStyle"));
				#endif
				#if VIRTUAL_WORLD == 1
				SetPlayerVirtualWorld(playerid, dini_Int(file, "VirtualWorld"));
				#endif
				#if PLAYER_TIME == 1
				SetPlayerTime(playerid, dini_Int(file, "pTime_Hour"), dini_Int(file, "pTime_Min"));
				#endif
				#if WANTED_LEVEL == 1
				SetPlayerWantedLevel(playerid, dini_Int(file, "WantedLevel"));
				#endif
				#if TEAM == 1
				SetPlayerTeam(playerid, dini_Int(file, "Team"));
				#endif
			}
Reply
#2

BUMP!
Reply
#3

Make sure "SKIN" is 1, and secondly are you using spectate mode while you connect to the server? If yes, replace the SpawnPlayer with TogglePlayerSpectating(playerid, 0);(There is no need to have also SpawnPlayer, because this is called while turning off the spectate).
Reply
#4

nope,its still same
and SKIN is 1
Reply
#5

iBUMP!
Reply
#6

Quote:
Originally Posted by Fog™
iBUMP!
wait 12 hours! and then post again btw
Reply
#7

omfg,BUMP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)