Won't Connect To Server Because Of This Code!!!
#1

Yea hi...

I have these codes right here:

//On Top
Код:
forward PlayerToLordsHQ(playerid);
forward PlayerToLordsHQ2(playerid);

new TLbinnendeur1;
new TLbinnendeur2;
new TLbuitendeur1;
new TLbuitendeur2;
//OnGameModeInIt
Код:
SetTimer("PlayerToLordsHQ", 1000, 1);
SetTimer("PlayerToLordsHQ2", 1000, 1);

TLbinnendeur1 = CreateDynamicObject(971, 1528.923706, -1469.829590, 11.569941, 0.0000, 0.0000, 268.2811);
TLbinnendeur2 = CreateDynamicObject(971, 1528.786621, -1478.593872, 11.619940, 0.0000, 0.0000, 270.0000);
TLbuitendeur1 = CreateDynamicObject(971, 1530.387695, -1451.271973, 15.930925, 0.0000, 0.0000, 180.0000);
TLbuitendeur2 = CreateDynamicObject(971, 1539.209717, -1451.266846, 15.927746, 0.0000, 0.0000, 180.0000);
//On Bottom
Код:
public PlayerToLordsHQ(playerid)
{
  if(PlayerToPoint(10.0, playerid, 1534.812012, -1451.070190, 13.269219))
  {
  	MoveDynamicObject(TLbuitendeur1, 1542.122437, -1451.220337, 15.939064, 3);
  	MoveDynamicObject(TLbuitendeur2, 1527.415527, -1451.300537, 15.935478, 3);
  }
  else
  {
    if(!PlayerToPoint(10.0, playerid, 1534.812012, -1451.070190, 13.269219))
    {
	    MoveDynamicObject(TLbuitendeur1, 1530.387695, -1451.271973, 15.930925, 3);
	  	MoveDynamicObject(TLbuitendeur2, 1528.786621, -1478.593872, 11.619940, 3);
		}
	}
  return 1;
}

public PlayerToLordsHQ2(playerid)
{
  if(PlayerToPoint(10.0, playerid, 1528.974121, -1474.262573, 9.375766))
  {
  	MoveDynamicObject(TLbinnendeur1, 1528.957031, -1463.708130, 11.668335, 3);
  	MoveDynamicObject(TLbinnendeur2, 1528.819824, -1485.698853, 11.627216, 3);
  }
  else
  {
    if(!PlayerToPoint(10.0, playerid, 1528.974121, -1474.262573, 9.375766))
    {
      MoveDynamicObject(TLbinnendeur1, 1528.923706, -1469.829590, 11.569941, 3);
  	  MoveDynamicObject(TLbinnendeur2, 1528.786621, -1478.593872, 11.619940, 3);
		}
	}
  return 1;
}
I get no errors with this code, but it won't let me join my server. It stops at: "Connection success. Loading network game..."

Please help

Reply
#2

pawn Код:
SetTimer("PlayerToLordsHQ", 1000, 1);
public PlayerToLordsHQ(playerid)
You don't pass the playerid to the function. Also OnGameModeInit doesn't support playerid, so use this in OnPlayerConnect:
pawn Код:
SetTimerEx("PlayerToLordsHQ", 1000, 1, "i", playerid);
Reply
#3

ty,

Now it DOES connect to the server, but I can't select any of my characters and I can't spawn.
Reply
#4

Think guys! Think
Reply
#5

Reply
#6

shit sorry for triple post
Reply
#7

how do you know that it is about that code?

show me your ongamemodeinit
your onplayerconnect
and your onplayerspawn

ok?

btw:

ben je nederlands?:P
Reply
#8

ja ik ben nederlands

hoe ik weet dat het aan die code ligt: Voordat ik deze code in mijn script had zitten deed mijn server het gewoon nog goed. Toen de server het niet meer deed heb ik de code weer even verwijderd en toen deed ie het weer. Dus het moet wel aan deze code liggen.

Ik heb de code in de tussentijd een beetje veranderd (zonder succes )
Dit zijn alle functies die met het hele gezeik te maken hebben.

OnGameModeInIt
pawn Код:
TLbinnendeur1 = CreateDynamicObject(971, 1528.923706, -1469.829590, 11.569941, 0.0000, 0.0000, 268.2811);
TLbinnendeur2 = CreateDynamicObject(971, 1528.786621, -1478.593872, 11.619940, 0.0000, 0.0000, 270.0000);
TLbuitendeur1 = CreateDynamicObject(971, 1530.387695, -1451.271973, 15.930925, 0.0000, 0.0000, 180.0000);
TLbuitendeur2 = CreateDynamicObject(971, 1539.209717, -1451.266846, 15.927746, 0.0000, 0.0000, 180.0000);
OnPlayerConnect
pawn Код:
SetTimerEx("PlayerToLordsHQ", 1000, 1, "i", playerid);
    SetTimerEx("PlayerToLordsHQ2", 1000, 1, "i", playerid);
Bij OnPlayerSpawn heb ik niks.

Dat was het
Reply
#9

Do you even have any AddPlayerClass in your gamemodeinit ?
Reply
#10

yes, I have like 8 of them. I just won't let me choose my character and also it won't spawn
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)