27.09.2012, 16:46
Hi there,
I have this weird bug with spawning, which for I can't find a reason to explain it, nor a fix that could get rid of it. I am running a script on MySQL database. The trouble is, whenever a player is assigned to a faction (I mean, I'm not sure, there was no issues when player's faction was zero) and /enters an interior, after reconnecting, normally they should be spawned and a statistics dialog should appear on the screen. It only displays the dialog, and shows a class selection and spawn buttons. When you press spawn, this rubbish appears...

The other weird thing is that this time, I didn't get that, but my friend did. I could login normally again and get spawned again. Maybe because like I said, I wasn't in a faction, and he was.
Some /enter code...
After looking at this, it made me wonder whether it could be the player's interior not being reset OnPlayerDisconnect or Connect...
Faction spawn...
I have this weird bug with spawning, which for I can't find a reason to explain it, nor a fix that could get rid of it. I am running a script on MySQL database. The trouble is, whenever a player is assigned to a faction (I mean, I'm not sure, there was no issues when player's faction was zero) and /enters an interior, after reconnecting, normally they should be spawned and a statistics dialog should appear on the screen. It only displays the dialog, and shows a class selection and spawn buttons. When you press spawn, this rubbish appears...

The other weird thing is that this time, I didn't get that, but my friend did. I could login normally again and get spawned again. Maybe because like I said, I wasn't in a faction, and he was.
Some /enter code...
Код:
command(enter, playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2491.0925,2363.2156,10.2724))
{
SetPlayerPos(playerid, 207.737991,-109.019996,1005.132812);
SetPlayerInterior(playerid, 15);
GameTextForPlayer(playerid, "~w~Phat Clothing~n~~r~Type /exit to go outside", 3000, 5);
LoadInterior(playerid);
}
Faction spawn...
Код:
else if(Player[playerid][SpawnPoint] == 6) //Faction Spawn
{
TogglePlayerSpectating(playerid, false);
if(Player[playerid][ClothesUsed] == 1)
{
SetSpawnInfo(playerid, 0, Player[playerid][Clothes1], Factions[Player[playerid][Faction]][fSpawnX], Factions[Player[playerid][Faction]][fSpawnY], Factions[Player[playerid][Faction]][fSpawnZ], Factions[Player[playerid][Faction]][fSpawnA], 0, 0, 0, 0, 0, 0);
SetPlayerVirtualWorld(playerid, 0);
SpawnPlayer(playerid);
if(Player[playerid][Faction] == 1)
{
SetPlayerArmour(playerid, 100);
}
if(Player[playerid][Faction] == 2)
{
GivePlayerWeapon(playerid, 42, 99999);
}
SetPlayerArmedWeapon(playerid, 0);
}
else if(Player[playerid][ClothesUsed] == 2)
{
SetSpawnInfo(playerid, 0, Player[playerid][Clothes2], Factions[Player[playerid][Faction]][fSpawnX], Factions[Player[playerid][Faction]][fSpawnY], Factions[Player[playerid][Faction]][fSpawnZ], Factions[Player[playerid][Faction]][fSpawnA], 0, 0, 0, 0, 0, 0);
SetPlayerVirtualWorld(playerid, 0);
SpawnPlayer(playerid);
if(Player[playerid][Faction] == 1)
{
SetPlayerArmour(playerid, 100);
}
if(Player[playerid][Faction] == 2)
{
GivePlayerWeapon(playerid, 42, 99999);
}
SetPlayerArmedWeapon(playerid, 0);
}
else if(Player[playerid][ClothesUsed] == 3)
{
SetSpawnInfo(playerid, 0, Player[playerid][Clothes3], Factions[Player[playerid][Faction]][fSpawnX], Factions[Player[playerid][Faction]][fSpawnY], Factions[Player[playerid][Faction]][fSpawnZ], Factions[Player[playerid][Faction]][fSpawnA], 0, 0, 0, 0, 0, 0);
SetPlayerVirtualWorld(playerid, 0);
SpawnPlayer(playerid);
if(Player[playerid][Faction] == 1)
{
SetPlayerArmour(playerid, 100);
}
if(Player[playerid][Faction] == 2)
{
GivePlayerWeapon(playerid, 42, 99999);
}
SetPlayerArmedWeapon(playerid, 0);
}
}
}


