PDA

View Full Version : Spawn bug


DokiStone
27/01/2015, 05:46 PM
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;
}

GGW
27/01/2015, 06:08 PM
USE These under public OnPlayerRequestClass

SetPlayerFacingAngle( playerid, 0 ); //Player faces north
SetPlayerCameraPos(playerid, Float:x, Float:y, Float:z);
SetPlayerCameraLookAt(playerid,Float:x,Float:y,Flo at:z,cut = CAMERA_CUT);

here is the wiki page for the codes

http://wiki.sa-mp.com/wiki/Function:SetPlayerFacingAngle

http://wiki.sa-mp.com/wiki/SetPlayerCameraPos

http://wiki.sa-mp.com/wiki/SetPlayerCameraLookAt

DokiStone
27/01/2015, 09:32 PM
Nothing...

DokiStone
28/01/2015, 04:44 PM
HELP

nezo2001
28/01/2015, 04:48 PM
You have to
SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
SpawnPlayer(playerid);

DokiStone
28/01/2015, 09:18 PM
Thank you, it's fixed. :)