SA-MP Forums Archive
wont spawn if will login - 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: wont spawn if will login (/showthread.php?tid=140848)



wont spawn if will login - WardenCS - 10.04.2010

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
			}



Re: wont spawn if will login - WardenCS - 10.04.2010

BUMP!


Re: wont spawn if will login - Dark_Kostas - 10.04.2010

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


Re: wont spawn if will login - WardenCS - 12.04.2010

nope,its still same
and SKIN is 1


Re: wont spawn if will login - WardenCS - 12.04.2010

iBUMP!


Re: wont spawn if will login - sjvt - 12.04.2010

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


Re: wont spawn if will login - WardenCS - 13.04.2010

omfg,BUMP