SA-MP Forums Archive
Spawning closing server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Spawning closing server (/showthread.php?tid=283409)



Spawning closing server - Luis- - 14.09.2011

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.


Re: Spawning closing server - Ash. - 14.09.2011

Does it print any error to the server_log?

OnPlayerSpawn and possibly OnPlayerRequestSpawn, is probably the critter!


Re: Spawning closing server - Luis- - 14.09.2011

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;
}



Re: Spawning closing server - Ash. - 14.09.2011

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


Re: Spawning closing server - Davz*|*Criss - 14.09.2011

Perhaps the problem would be other Filterscripts/or something.


Re: Spawning closing server - Luis- - 14.09.2011

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.


Re: Spawning closing server - Ash. - 14.09.2011

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!


Re: Spawning closing server - Luis- - 14.09.2011

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


Re: Spawning closing server - Ash. - 14.09.2011

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


Re: Spawning closing server - Luis- - 14.09.2011

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