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.
Код:
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;
}
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);
PHP код:
SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
SpawnPlayer(playerid);
Thank you, it's fixed.