Why when we log in game it goes to blueberry?
#1

Help please.. Why when everytime we log back in, in my server. We goes to blueberry but it saves the players infos etc. The only problem is they go to blueberry everytime they login.
Reply
#2

Because spawn coordinates are not set, they are 0.0,0.0,0.0 which are blueberry coords.
Reply
#3

add a player class

go in game and type /save [name here]
Reply
#4

He'll get Crash if he doesn't use AddPlayerClass(). But the coordinats from can be 0.0, 0.0, 0.0 or you're forgot to add plugins. Then your script doesn't work. Look at your GM Name. Unknown? Then you need add plugins.
Reply
#5

pawn Код:
public OnPlayerSpawn
{
        SetPlayerPos(playerid, float:x, float:y, float: z);
        return 1;
}
The coords above, you can get them by going in game and doing /save.
Reply
#6

I assume, you're using the login and after the player is logged in you spawn him. You can either use SetSpawnInfo or set player's position like FireCat posted.
Reply
#7

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
I assume, you're using the login and after the player is logged in you spawn him. You can either use SetSpawnInfo or set player's position like FireCat posted.
BTW I forgot to add. It only happens on admins. Theres no problem on the ordinary players.
Reply
#8

Hmm, we'll find out why, but I need you to show us a part of code?
Reply
#9

Quote:
Originally Posted by _Zeus
Посмотреть сообщение
Hmm, we'll find out why, but I need you to show us a part of code?
I think 00000000 there below is the mistake... What will I change to it?

Код:
public OnPlayerSpawn(playerid)
{
    TogglePlayerSpectating(playerid, false);
	// Anti F4 Bug - Logging/Registering
	if(!PlayerInfo[playerid][pLoggedIn] && !IsPlayerNPC(playerid))
	{
 		if(DID_IJUSTDIE[playerid])
        SetPlayerPos(playerid, MYCOOL_COORDS[playerid][0], MYCOOL_COORDS[playerid][1], MYCOOL_COORDS[playerid][2]),
        SetPlayerFacingAngle(playerid, MYCOOL_COORDS[playerid][3]),
        TogglePlayerControllable(playerid, false),
        DID_IJUSTDIE[playerid] = false;
		if(IsPlayerNPC(playerid)) return 1;
		SetPlayerJoinCamera(playerid);
	    SetSpawnInfo( playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
	    new file[64];
		format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
	    // Player isn't banned
	    if(dini_Int(file, "AdminAccount") == 1)
		{
		    format(file, sizeof(file), "users/%s.ini",RPNU(playerid));
		    SetPlayerName(playerid, dini_Get(file, "OldName"));
		    format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
		    ShowDialog(playerid, 2);
		}
		if(!dini_Exists(file))
		{
		    ShowDialog(playerid, 1);
		    return 1;
		}
		else
		{
			ShowDialog(playerid, 2);
		}
		return 1;
	}
	// Actual Spawning
    ResetPlayerWeapons(playerid);
	if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
	{
	  new npcname[MAX_PLAYER_NAME];
	  GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
	  if(!strcmp(npcname, "GOD", true)) //Checking if the NPC's name is GOD
	  { //Putting the NPC into the vehicle we created for it.
	    return 1;
	  }
	  return 1;
	}
    if(PlayerInfo[playerid][pLoggedIn] && PlayerInfo[playerid][pSpawn])
    {
        FalseBan[playerid] = 0;
        SetTimerEx("FalseBanFix", 6000, false, "i", playerid);
		SpawnChar(playerid);
    }
    if (!GetPVarInt(playerid, "color")) SetPVarInt(playerid, "color", 18643);
	return 1;
}
Reply
#10

Quote:
Originally Posted by SA:MP Wiki
This function can be used to change the spawn information of a specific player.
You've added
pawn Код:
SetSpawnInfo( playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
Also, when you login, does it actually load the coordinates and store them here?
pawn Код:
MYCOOL_COORDS[playerid][0]
MYCOOL_COORDS[playerid][1]
MYCOOL_COORDS[playerid][2]
MYCOOL_COORDS[playerid][3]
Because you mentioned that this happens on admins, you've gotten only one statement which is related to admins. What dialog ID 2 is about? Does it do something on that callback such as setting the position again or not?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)