[SOLVED] OnPlayerConnect NOT being called?
#1

pawn Код:
public OnFilterScriptInit()
{
  print("OnFilterScriptInit");
  return 1;
}

public OnFilterScriptExit()
{
  print("OnFilterScriptExit");
  return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
  print("OnPlayerRequestClass");
  return 1;
}

public OnPlayerConnect(playerid)
{
  print("OnPlayerConnect");
  return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
  print("OnPlayerDisconnect");
  return 1;
}

public OnPlayerSpawn(playerid)
{
  print("OnPlayerSpawn");
  return 1;
}
[code=Server log]
Console input: loadfs test
[14:27:53] OnFilterScriptInit
[14:27:53] Filterscript 'test.amx' loaded.
[14:28:07] Incoming connection: 127.0.0.1:59448
[14:28:07] [join] Torran has joined the server (0:127.0.0.1)
[14:28:07] OnPlayerRequestClass
[14:28:31] OnPlayerSpawn[/code]

As you see OnPlayerConnect is not being called.
Its not just this FS it seems to be all of them.

Any ideas?



Whole script:
http://pastebin.com/mmAKqUyF
Reply
#2

Try putting something in OnPlayerConnect as a SendClientMessage, so the public should be called.
Reply
#3

Quote:
Originally Posted by [BEP
GeoPilot ]
Try putting something in OnPlayerConnect as a SendClientMessage, so the public should be called.
As i said, Ive already done that, In other FS
Reply
#4

Did you try to leave the OnPlayerConnect out and then only put it into the main script?
Reply
#5

It would need to be in a filterscript
Reply
#6

Quote:
Originally Posted by Joe Torran C
[code=Server log]
Console input: loadfs test
[14:27:53] OnFilterScriptInit
[14:27:53] Filterscript 'test.amx' loaded.
[14:28:07] Incoming connection: 127.0.0.1:59448
[14:28:07] [join] Torran has joined the server (0:127.0.0.1)
[14:28:07] OnPlayerRequestClass
[14:28:31] OnPlayerSpawn[/code]

As you see OnPlayerConnect is not being called.
Its not just this FS it seems to be all of them.

Any ideas?
I think that the gamemode is stoping it work becouse you have
[14:28:07] [join] Torran has joined the server (0:127.0.0.1)
ON your gamode or other FS
But that Shoodunt be the problem
Reply
#7

I cant remove that
Reply
#8

This must fix it, I hope

pawn Код:
public OnPlayerConnect(playerid)
{
   new pName[MAX_PLAYER_NAME];
   print("Incoming connection from %s", pName);
}
If you get errors, please inform me. Eventually change the 'Incoming connection from' to the one you want
Reply
#9

Quote:
Originally Posted by Crisis Funserver
This must fix it, I hope

pawn Код:
public OnPlayerConnect(playerid)
{
   new pName[MAX_PLAYER_NAME];
   print("Incoming connection from %s", pName);
}
If you get errors, please inform me. Eventually change the 'Incoming connection from' to the one you want
Yeah that shood work
Reply
#10

As i keep on saying! No matter what i put in it. It dosent get called!
Reply
#11

Quote:
Originally Posted by Joe Torran C
As i keep on saying! No matter what i put in it. It dosent get called!
If you want it in your server console it is printf, else you are doing something weird, because it MUST work!
Reply
#12

Quote:
Originally Posted by Crisis Funserver
Quote:
Originally Posted by Joe Torran C
As i keep on saying! No matter what i put in it. It dosent get called!
If you want it in your server console it is printf
You dont understand, The server is reacting like there isent a OnPlayerConnect in my script but there is
Reply
#13

OK so i got the script form the POSTBIN
i tested it
And evrything work fine so it must be from some of your scripts or GM
I got a pic to prove it workes
Reply
#14

Well i have found the problem,

You know the filterscript fsdebug that comes with SA-MP server package.
The OnPlayerConnect on there returns 0

Fixed now, Thanks for your help
Reply
#15

Attention , maybe you have a filterscript which contains too OnPlayerConnect , and he don't return nathing or he return 0
Reply
#16

Quote:
Originally Posted by NewTorran
Посмотреть сообщение
Well i have found the problem,

You know the filterscript fsdebug that comes with SA-MP server package.
The OnPlayerConnect on there returns 0

Fixed now, Thanks for your help
Rofl lol been working my brains for a long time to see why it does'nt work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)