Spawning closing server
#1

Hello, I can't quite get my had around this as I am spawning perfectly fine on my localhost server but when I try my VPS it just closes the server, if you could also reply with which codes you'd need to see then I will gladly post.

Kind Regards, Luis.
Reply
#2

Does it print any error to the server_log?

OnPlayerSpawn and possibly OnPlayerRequestSpawn, is probably the critter!
Reply
#3

I haven't found any errors within the server_log.

OnPlayerSpawn.
pawn Код:
public OnPlayerSpawn(playerid)
{
    ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "San Andreas Avation ~ Spawn", "Los Santos Airport\nSan Fierro Airport[WIP]\nLas Venturas Airport[WIP]", "Spawn", "");
    GameTextForPlayer(playerid, " ", 500, 5);
    if(MoneyGiven[playerid] != -1)
    {
        GivePlayerMoney(playerid, MoneyGiven[playerid]);
        MoneyGiven[playerid] = -1;
    }
    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
    TogglePlayerSpectating(playerid, false);

    SetPlayerInterior(playerid, 0);
    SetCameraBehindPlayer(playerid);

    for(new i; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            TextDrawShowForPlayer(playerid, PlayerJoin);
            new string[128], h, m, s, day, month, year;
            getdate(year, month, day);
            gettime(h, m, s);
            format(string, sizeof(string), "~g~%s~n~~w~Has Joined. ~g~%d/%d/%d - %d:%d:%d", PlayerName(i), day, month, year, h, m, s);
            TextDrawShowForPlayer(i, PlayerJoin);
            TextDrawSetString(PlayerJoin, string);
        }
    }
    return 1;
}
OnPlayerRequestClass.
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    return 1;
}
Reply
#4

You have 'TextDrawShowForPlayer(playerid..' IN the MAX_PLAYERS loop, a possible cause?
Reply
#5

Perhaps the problem would be other Filterscripts/or something.
Reply
#6

I don't have any other filterscripts.

funky1234: I'll try it now.

Right, it is still doing it for some reason, I am seriously confused.
Reply
#7

Just as a thought; try commenting out the loop (and its contents) and see if it works then. I'm confused to, it looks perfectly fine to me!
Reply
#8

Just a side note, it works when a player registers but not when a player is logging in.
Reply
#9

Is the skinid and other data correctly getting assigned to: 'PlayerInfor' on login? Are you assigning things differently compared to whenn they register? That just makes this more of a puzzle! Haha
Reply
#10

Right got it working for now, should be fully fixed soon , thanks for the help. Gave you rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)