Spawn bug
#1

Hello again,
When i enter my password, it is supposed to spawn me on Mount Chilliad, but instead it just stands here and i have to click the "spawn" button to spawn.
Picture: http://prntscr.com/5xsc2x
Dialog login :
Код:
if (dialogid == LOGIN)
	{
	    if (!response) return Kick(playerid);
	    if (response)
	    {
	       new hashpass[129];
	       WP_Hash(hashpass,sizeof(hashpass),inputtext);
	       if(!strcmp(hashpass, PlayerInfo[playerid][Password], false))
	       {
				new str[250], AdminRank[50], msg[128], str2[128];
	            INI_ParseFile(UserPath(playerid), "loadaccount_%s", .bExtra = true, .extra = playerid);
	            SetPlayerScore(playerid, PlayerInfo[playerid][Score]);
	            GivePlayerMoney(playerid, PlayerInfo[playerid][Cash]);
	            SetPlayerColor(playerid, PlayerInfo[playerid][Color]);
				switch(PlayerInfo[playerid][Admin])
				{
				    case 1: AdminRank = "Supporter";
					case 2: AdminRank = "Administrator";
					case 3: AdminRank = "Head Administrator";
					case 4: AdminRank = "Server Owner";
				}
				if (PlayerInfo[playerid][VIP] >= 1 && isnull(PlayerInfo[playerid][AltName]))
				{
					format(msg, sizeof(msg), "{FFD700}[HCF] {87F5EA}VIP {%06x}%s(%d) {A1D4CF}{87F5EA}has logged in.", (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid);
    				SendClientMessageToAll(-1, msg);
				}
   				else if (PlayerInfo[playerid][VIP] >= 1)
				{
    				format(msg, sizeof(msg), "{FFD700}[HCF] {87F5EA}VIP {%06x}%s(%d) {A1D4CF}(%s) {87F5EA}has logged in.", (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid, PlayerInfo[playerid][AltName]);
   					SendClientMessageToAll(-1, msg);

				}
				if (PlayerInfo[playerid][Admin] >= 1)
				{
					format(msg, sizeof(msg), "{FFD700}[HCF] {DEF968}%s {%06x}%s(%d) {DEF968}has logged in.", AdminRank, (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid);
					SendClientMessageToAll(-1, msg);
				}
				format(str, sizeof(str), "** Welcome back, %s! You were last online on {CB6CE6}%s{FFB6C1}!", GetName(playerid), lastactive);
				SendClientMessage(playerid, COLOR_PINK, str);
				format(str2, sizeof(str2), "** You have been online for %i hours and %i minutes in total.", PlayerInfo[playerid][Hours], PlayerInfo[playerid][Minutes]);
				SendClientMessage(playerid, 0xFFD70075, str2);
				SpawnPlayer(playerid);
				AddPlayerClass(0, -2355.9038,-1635.4912,483.7031,284.7480, 24, 500, 31, 500, 32, 500);
				SetPlayerPos(playerid, -2355.9038,-1635.4912,483.7031);
				gOnlineTime = SetTimerEx("TimeOnServer", 60000, true, "i", playerid);
				PlayerInfo[playerid][Spawned] = 1;
				PlayerInfo[playerid][LoggedIn] = 1;
	       }
Reply
#2

USE These under public OnPlayerRequestClass

pawn Код:
SetPlayerFacingAngle( playerid, 0 ); //Player faces north
     SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z);
     SetPlayerCameraLookAt(playerid,Float:x,Float:y,Float:z,cut = CAMERA_CUT);
here is the wiki page for the codes

https://sampwiki.blast.hk/wiki/Function:...yerFacingAngle

https://sampwiki.blast.hk/wiki/SetPlayerCameraPos

https://sampwiki.blast.hk/wiki/SetPlayerCameraLookAt
Reply
#3

Nothing...
Reply
#4

HELP
Reply
#5

You have to
PHP код:
SetSpawnInfo(playeridteamskinFloat:xFloat:yFloat:zFloat:Angleweapon1weapon1_ammoweapon2weapon2_ammoweapon3weapon3_ammo);
SpawnPlayer(playerid); 
Reply
#6

Thank you, it's fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)