Need Help! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need Help! (
/showthread.php?tid=252960)
Need Help! -
Nuk3d1nk - 03.05.2011
I am a intermediate scripter, having scripted privately for a few months.
I am currently in the process of building a roleplay server, but I am having a problem on finalizing it.
This is my problem, when I connect a player to my server, once the player has passed the loading screen & Connecting to (127.0.0.1:7777). The server stops itself & ends server.exe. I am having little to no luck what-so-ever on fixing this, would you be so kind to assist me in my progress.
When I connect via LOCALHOST, the server.exe starts fine, I connect via SA:MP Client, Pass loading screen, once it begins showing the text, it says USER has connected then server.exe crashes. Hope that explains it.
Код:
public OnPlayerConnect(playerid)
{
//if(IsPlayerNPC(playerid)) return 1;
F_OnPlayerConnect(playerid);
// ClearVars(playerid);
// SyncCheckpoints(playerid);
Inf[playerid] = 1;
gPlayerUsingLoopingAnim[playerid] = 0;
gPlayerAnimLibsPreloaded[playerid] = 0;
PlayerInfo[playerid][EngineOff] = 0;
pInfo[playerid][driver] = 0;
PlayerInfo[playerid][Warnings] = 0;
TextDrawShowForPlayer(playerid,txtGMName);
//time();
//F_GivePlayerMoney(playerid,50000);
if(udb_Exists(ReturnPlayerName(playerid)))
{ //account exists
SendClientMessage(playerid, COLOR_RED, "Welcome to NaPalm Roleplay!");
SendClientMessage(playerid,COLOR_MAIN,"We'd like to welcome you back to the server. Please enjoy your stay.");
SendClientMessage(playerid,COLOR_MAIN,"Please use /login [password] to login to your account now.");
SendClientMessage(playerid,COLOR_MAIN,"Lets Roleplay, Baby!");
}
else
{
Re: Need Help! -
Firzendxiw - 03.05.2011
Is this the whole of OnPlayerConnect or is there more?
Re: Need Help! -
Steven82 - 03.05.2011
Quote:
Originally Posted by Firzendxiw
Is this the whole of OnPlayerConnect or is there more?
|
There is obviously more..it just ends and he is afraid someone will steal his 'precious' code.
Re: Need Help! -
miokie - 03.05.2011
Debug it with prints.
Example:
pawn Код:
public OnPlayerConnect(playerid)
{
print("1");
//if(IsPlayerNPC(playerid)) return 1;
F_OnPlayerConnect(playerid);
print("2");
// ClearVars(playerid);
// SyncCheckpoints(playerid);
Inf[playerid] = 1;
print("3");
gPlayerUsingLoopingAnim[playerid] = 0;
print("4");
Etc... and see how much of it loads, then you will find your problem.