15.02.2015, 07:20
Здрасте. У меня такая проблема.
При заходе на сервер игрока попросту отсоединяет. В логах ничего. Крашдетект подключен но он тоже ничего не выдаёт. В чём может быть причина
OnPlayerConnect:
При заходе на сервер игрока попросту отсоединяет. В логах ничего. Крашдетект подключен но он тоже ничего не выдаёт. В чём может быть причина
OnPlayerConnect:
PHP код:
public OnPlayerConnect(playerid)
{
//SetPlayerColor(playerid, CGRAY);
new ip[32];
/* GetPlayerIp(playerid,ip,32);
for(new i;i<MAX_PLAYERS;i++)
{
if(gReconnectTime[i] <= 0) continue;
if(!strcmp(ip,gReconnectIP[i],false) && strlen(gReconnectIP[i]))
{
printf("Reconnect IP: %s = %s, Time: %d",ip,gReconnectIP[i],gReconnectTime[i]);
SendClientMessage(playerid,CGRAY,"Ïåðåçàõîäèòü ìîæíî íå ìåíåå ÷åì ÷åðåç 5 ñåêóíä");
gReconnectTime[i] += 5;
if(gReconnectTime[i] >= 30)
{
new mes[128];
format(mes,sizeof(mes),"banip %s",ip);
SendRconCommand(mes);
}
NewKick(playerid);
return 0;
}
}*/
SetPlayerDataToDefault(playerid);
format(pTemp[playerid][pIP],32,"%s",ip);
new slot;
for(new i;i<MAX_PLAYERS;i++)
{
if(!gReconnectTime[i]) {slot = i; break;}
}
format(gReconnectIP[slot],32,"%s",pTemp[playerid][pIP]);
gReconnectTime[slot] = 5;
//CreateHungerTextDraw(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);
}
new Float: gBarPos[2];
gBarPos[0] = 450.0; gBarPos[1] = 125.0;
for(new x = 0; x < 5; x ++) { // öåíû
if(x > 0) gBarPos[1] += 50.0;
format(str, sizeof(str), "$%i", gBarCosts[x]);
gBarCostTextDraw[playerid][x] = CreatePlayerTextDraw(playerid, gBarPos[0], gBarPos[1], str);
PlayerTextDrawLetterSize(playerid, gBarCostTextDraw[playerid][x], 0.560000, 2.142500);
PlayerTextDrawAlignment(playerid, gBarCostTextDraw[playerid][x], 1);
PlayerTextDrawColor(playerid, gBarCostTextDraw[playerid][x], -1);
PlayerTextDrawSetShadow(playerid, gBarCostTextDraw[playerid][x], 0);
PlayerTextDrawSetOutline(playerid, gBarCostTextDraw[playerid][x], 1);
PlayerTextDrawBackgroundColor(playerid, gBarCostTextDraw[playerid][x], 51);
PlayerTextDrawFont(playerid, gBarCostTextDraw[playerid][x], 3);
PlayerTextDrawSetProportional(playerid, gBarCostTextDraw[playerid][x], 1);
}
gSkinShopPriceDraw[playerid] = CreatePlayerTextDraw(playerid, 31.000000, 224.000000, "_");
PlayerTextDrawBackgroundColor(playerid, gSkinShopPriceDraw[playerid], 255);
PlayerTextDrawFont(playerid, gSkinShopPriceDraw[playerid], 3);
PlayerTextDrawLetterSize(playerid, gSkinShopPriceDraw[playerid], 0.500000, 1.600000);
PlayerTextDrawColor(playerid, gSkinShopPriceDraw[playerid], -1);
PlayerTextDrawSetOutline(playerid, gSkinShopPriceDraw[playerid], 0);
PlayerTextDrawSetProportional(playerid, gSkinShopPriceDraw[playerid], 1);
PlayerTextDrawSetShadow(playerid, gSkinShopPriceDraw[playerid], 1);
return 1;
}