Question

Добрый вечер! При входе на сервер происходит конектинг и игра зависает ровно на 20 секунд, причём у всех)Причём потом все отлично. С чем это связано можете подсказать, заранее спасибо! 

Edited by Stefashka

Share this post


Link to post
Share on other sites

6 answers to this question

  • 0

OnPlayerConnect в студию

Игра зависает после спавна? Регистрации? Авторизации?

Edited by SCRIPTMAN

Share this post


Link to post
Share on other sites
  • 0

@SCRIPTMAN  Зависание происходит перед авторизацией, после того как происходит конектинг к серверу в течений 20 секунд виснет.

public OnPlayerConnect(playerid)
{
	for (new i = 0; i < 46; i++)
	{
		pTemp[playerid][pSavegun][i] = 0;
		pTemp[playerid][pSaveammo][i] = 0;
	}
    drieltorka[playerid] = 0;
    pTemp[playerid][pGodmode] = 0;
	ZapretDice[playerid] = 0;
	KostiName[playerid] = 999;
	KostiNamePL[playerid] = 999;
	KostiMoney[playerid] = 0;
    SetPVarInt(playerid, "Position", gettime() + 600);
    pTemp[playerid][pWorkSalary] = 0;
    pTemp[playerid][pGnews] = 0;
    PreloadAllAnims(playerid);
 	gCalls[playerid][g_caller] = INVALID_PLAYER_ID;
	gCalls[playerid][g_callee] = INVALID_PLAYER_ID;
	Smokes[playerid]    = 0;
	Smoke[playerid]     = 0;
	SmokeTime[playerid] = 0;
 	pTemp[playerid][pShowMedpl] = -1;
	pTemp[playerid][pShowMedct] = -1;
	pTemp[playerid][pShowPasspl] = -1;
	pTemp[playerid][pShowPassact] = -1;
	pTemp[playerid][pGiveHipl] = -1;
	pTemp[playerid][pGiveHiact] = -1;
	pTemp[playerid][pShowUdpl] = -1;
	pTemp[playerid][pShowUdact] = -1;
	pTemp[playerid][pSellsimpl] = -1;
	pTemp[playerid][pSellsimact] = -1;
	pTemp[playerid][pSellsim] = 0;
	pTemp[playerid][pShowPtsact] = -1;
	pTemp[playerid][pShowPtspl] = -1;
	pTemp[playerid][pShowSkillact] = -1;
	pTemp[playerid][pShowSkillpl] = -1;
	pTemp[playerid][pShowLicpl] = -1;
	pTemp[playerid][pShowLicact] = -1;
	Ingatre[playerid]=-1;
    Vor[playerid] = 0;
    pTemp[playerid][pSpectating] = false;
    if(IsPlayerNPC(playerid)) return true;
    pTemp[playerid][pLogin4] = true;
   	pTemp[playerid][pSpecOn] = 0;
	pTemp[playerid][pSpectator] = INVALID_PLAYER_ID;
	pTemp[playerid][pSpectatee] = INVALID_PLAYER_ID;
    poxavat[playerid] = 0;
    //ñàëþò
 	SetPVarInt(playerid, "PType", 0);
	SetPVarInt(playerid, "PColor", 0);
	num[playerid] = 0;
	//#include <Mode/regint>
 	#include <Mode/destroy>
	ResetPlayerWeaponsEx(playerid);
	ResetPlayerWeaponsEx(playerid);
	new Float: gEateryPos[2], str[16];
	gEateryPos[0] = 450.0; gEateryPos[1] = 125.0;
	for(new x = 0; x < 4; x ++) { // öåíû
		if(x > 0) gEateryPos[1] += 50.0;
		format(str, sizeof(str), "$%i", gEateryCosts[x]);
		gEateryCostTextDraw[playerid][x] = CreatePlayerTextDraw(playerid, gEateryPos[0], gEateryPos[1], str);
		PlayerTextDrawLetterSize(playerid, gEateryCostTextDraw[playerid][x], 0.560000, 2.142500);
		PlayerTextDrawAlignment(playerid, gEateryCostTextDraw[playerid][x], 1);
		PlayerTextDrawColor(playerid, gEateryCostTextDraw[playerid][x], -1);
		PlayerTextDrawSetShadow(playerid, gEateryCostTextDraw[playerid][x], 0);
		PlayerTextDrawSetOutline(playerid, gEateryCostTextDraw[playerid][x], 1);
		PlayerTextDrawBackgroundColor(playerid, gEateryCostTextDraw[playerid][x], 51);
		PlayerTextDrawFont(playerid, gEateryCostTextDraw[playerid][x], 3);
		PlayerTextDrawSetProportional(playerid, gEateryCostTextDraw[playerid][x], 1);
	}

Заметка от DEST , создано

Как правильно выкладывать код - FAQ

Share this post


Link to post
Share on other sites
  • 0

Возможно в окне авторизации много объектов, вот он их и грузит для прорисовки

Share this post


Link to post
Share on other sites
  • 0

@Stefashka мод-пак установлен?

Share this post


Link to post
Share on other sites
  • 0
В 10.04.2020 в 10:30, SCRIPTMAN сказал:

@Stefashka мод-пак установлен?

Нет

Share this post


Link to post
Share on other sites
  • 0

Давай проверку на регистрацию аккаунта

Share this post


Link to post
Share on other sites
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By def
      arizona.pwn(23374) : error 012: invalid function call, not a valid address
      arizona.pwn(23374) : error 001: expected token: ";", but found ")"
      arizona.pwn(23374) : error 029: invalid expression, assumed zero
      arizona.pwn(23374) : fatal error 107: too many error messages on one line
      жалуется на данную строчку:
       
      %s{cccccc}Для продолжения нажмите 'Далее'",PN(playerid),playerid,ItemsInfo[itemid][ItemName2],hours,cost*hours,Inventory[playerid][2][slot], AksColorName(Inventory[playerid][4][slot]), Inventory[playerid][5][slot] ? GetNameStripe(Inventory[playerid][5][slot]) : "");