[Ajuda] Samp Server crashando
#1

SA-MP Server: 0.3.7-R2



Exception At Address: 0x0049B4B1 Module: (samp-server.exe)



Registers:

EAX: 0x00000000 EBX: 0x00000002 ECX: 0x00000000 EDX: 0x00000000

ESI: 0x003511F0 EDI: 0x0000007C EBP: 0x0049B4A1 ESP: 0x0018FEA0

EFLAGS: 0x00010246



Stack:

+0000: 0x004AB4A0 0x0018FF78 0x004AB0E1 0xFFFFFFFF

+0010: 0x0049CCA6 0x00000001 0x003F14A8 0x003F14F0

+0020: 0x00000094 0x00000006 0x00000001 0x00001DB1

+0030: 0x00000002 0x76726553 0x20656369 0x6B636150

+0040: 0x00003120 0x00000000 0x00000000 0x00000000

+0050: 0x00000000 0x00000000 0x00000000 0x00000000

+0060: 0x00000000 0x00000000 0x00000000 0x00000000

+0070: 0x00000000 0x00000000 0x00000000 0x00000000

+0080: 0x00000000 0x00000000 0x00000000 0x00000000

+0090: 0x00000000 0x00000000 0x00000000 0x00000000

+00A0: 0x00000000 0x00000000 0x00000000 0x00000000

+00B0: 0x0049CB52 0x00000000 0x00000000 0x7EFDE000

+00C0: 0x00000000 0x00000000 0xC0000005 0x00000000

+00D0: 0x0018FEC0 0x0018F300 0x0018FFC4 0x0049D208

+00E0: 0x004BA530 0x00000000 0x0018FF94 0x75FE33CA

+00F0: 0x7EFDE000 0x0018FFD4 0x774E9ED2 0x7EFDE000

+0100: 0x7ED8C670 0x00000000 0x00000000 0x7EFDE000

+0110: 0x00000000 0x00000000 0x00000000 0x0018FFA0

+0120: 0x00000000 0x0018FFE4 0x77521ECD 0x098DFC84

+0130: 0x00000000 0x0018FFEC 0x774E9EA5 0x0049CB3A



--------------------------



Loaded Modules:

samp-server.exe A: 0x00400000 - 0x00519000 (C:\Users\Administrator\Desktop\BCP - RP\samp-server.exe)

ntdll.dll A: 0x774B0000 - 0x77630000 (C:\Windows\SysWOW64\ntdll.dll)

kernel32.dll A: 0x75FD0000 - 0x760E0000 (C:\Windows\syswow64\kernel32.dll)

KERNELBASE.dll A: 0x76BD0000 - 0x76C16000 (C:\Windows\syswow64\KERNELBASE.dll)

SHELL32.dll A: 0x75070000 - 0x75CBA000 (C:\Windows\syswow64\SHELL32.dll)

msvcrt.dll A: 0x76C70000 - 0x76D1C000 (C:\Windows\syswow64\msvcrt.dll)

SHLWAPI.dll A: 0x765D0000 - 0x76627000 (C:\Windows\syswow64\SHLWAPI.dll)

GDI32.dll A: 0x760E0000 - 0x76170000 (C:\Windows\syswow64\GDI32.dll)

USER32.dll A: 0x76A10000 - 0x76B10000 (C:\Windows\syswow64\USER32.dll)

ADVAPI32.dll A: 0x76690000 - 0x76730000 (C:\Windows\syswow64\ADVAPI32.dll)

sechost.dll A: 0x76B10000 - 0x76B29000 (C:\Windows\SysWOW64\sechost.dll)

RPCRT4.dll A: 0x76780000 - 0x76870000 (C:\Windows\syswow64\RPCRT4.dll)

SspiCli.dll A: 0x75010000 - 0x75070000 (C:\Windows\syswow64\SspiCli.dll)

CRYPTBASE.dll A: 0x75000000 - 0x7500C000 (C:\Windows\syswow64\CRYPTBASE.dll)

LPK.dll A: 0x77480000 - 0x7748A000 (C:\Windows\syswow64\LPK.dll)

USP10.dll A: 0x75F30000 - 0x75FCD000 (C:\Windows\syswow64\USP10.dll)

WSOCK32.dll A: 0x74D40000 - 0x74D47000 (C:\Windows\system32\WSOCK32.dll)

WS2_32.dll A: 0x76170000 - 0x761A5000 (C:\Windows\syswow64\WS2_32.dll)

NSI.dll A: 0x76B90000 - 0x76B96000 (C:\Windows\syswow64\NSI.dll)

WINMM.dll A: 0x73CE0000 - 0x73D12000 (C:\Windows\system32\WINMM.dll)

IMM32.DLL A: 0x76B30000 - 0x76B90000 (C:\Windows\system32\IMM32.DLL)

MSCTF.dll A: 0x761C0000 - 0x7628C000 (C:\Windows\syswow64\MSCTF.dll)

mysql.DLL A: 0x10000000 - 0x10015000 (C:\Users\Administrator\Desktop\BCP - RP\plugins\mysql.DLL)

LIBMYSQL.dll A: 0x70B40000 - 0x7104C000 (C:\Users\Administrator\Desktop\BCP - RP\LIBMYSQL.dll)

Secur32.dll A: 0x74CF0000 - 0x74CF8000 (C:\Windows\system32\Secur32.dll)

MSVCR90.dll A: 0x72B30000 - 0x72BD3000 (C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9 a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\MSVCR90 .dll)

MSVCP90.dll A: 0x73B40000 - 0x73BCD000 (C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9 a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\MSVCP90 .dll)

NLAapi.dll A: 0x74CE0000 - 0x74CF0000 (C:\Windows\system32\NLAapi.dll)

napinsp.dll A: 0x74010000 - 0x74020000 (C:\Windows\system32\napinsp.dll)

mswsock.dll A: 0x73FD0000 - 0x7400C000 (C:\Windows\System32\mswsock.dll)

DNSAPI.dll A: 0x73AF0000 - 0x73B34000 (C:\Windows\system32\DNSAPI.dll)

winrnr.dll A: 0x73CA0000 - 0x73CA8000 (C:\Windows\System32\winrnr.dll)

rasadhlp.dll A: 0x74D30000 - 0x74D36000 (C:\Windows\system32\rasadhlp.dll)

sscanf.DLL A: 0x00560000 - 0x0056D000 (C:\Users\Administrator\Desktop\BCP - RP\plugins\sscanf.DLL)

MSVCR100.dll A: 0x73A30000 - 0x73AEF000 (C:\Users\Administrator\Desktop\BCP - RP\MSVCR100.dll)

dbghelp.dll A: 0x74DB0000 - 0x74E9B000 (C:\Windows\system32\dbghelp.dll)

MSVCP100.dll A: 0x72A60000 - 0x72AC9000 (C:\Users\Administrator\Desktop\BCP - RP\MSVCP100.dll)

streamer.DLL A: 0x72A10000 - 0x72A56000 (C:\Users\Administrator\Desktop\BCP - RP\plugins\streamer.DLL)

MSVCP120.dll A: 0x72990000 - 0x72A01000 (C:\Users\Administrator\Desktop\BCP - RP\MSVCP120.dll)

MSVCR120.dll A: 0x728A0000 - 0x7298E000 (C:\Users\Administrator\Desktop\BCP - RP\MSVCR120.dll)

Whirlpool.DLL A: 0x00830000 - 0x0083C000 (C:\Users\Administrator\Desktop\BCP - RP\plugins\Whirlpool.DLL)

MSVCR80.dll A: 0x72610000 - 0x726AB000 (C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9 a1e18e3b_8.0.50727.4940_none_d08cc06a442b34fc\MSVC R80.dll)

nativechecker.DLL A: 0x74D10000 - 0x74D15000 (C:\Users\Administrator\Desktop\BCP - RP\plugins\nativechecker.DLL)

wshtcpip.dll A: 0x73C70000 - 0x73C75000 (C:\Windows\System32\wshtcpip.dll)

IPHLPAPI.DLL A: 0x73A10000 - 0x73A2C000 (C:\Windows\system32\IPHLPAPI.DLL)

WINNSI.DLL A: 0x73A00000 - 0x73A07000 (C:\Windows\system32\WINNSI.DLL)

wship6.dll A: 0x739F0000 - 0x739F6000 (C:\Windows\System32\wship6.dll)

PROPSYS.dll A: 0x726F0000 - 0x727E5000 (C:\Windows\system32\PROPSYS.dll)

OLEAUT32.dll A: 0x75EA0000 - 0x75F2F000 (C:\Windows\syswow64\OLEAUT32.dll)

comctl32.dll A: 0x743D0000 - 0x7456E000 (C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6 975e2bd6f2b2\comctl32.dll)

apphelp.dll A: 0x74D60000 - 0x74DAC000 (C:\Windows\system32\apphelp.dll)

CLBCatQ.DLL A: 0x76FF0000 - 0x77073000 (C:\Windows\syswow64\CLBCatQ.DLL)

iertutil.dll A: 0x763D0000 - 0x765CB000 (C:\Windows\syswow64\iertutil.dll)

urlmon.dll A: 0x76290000 - 0x763C6000 (C:\Windows\syswow64\urlmon.dll)

WININET.dll A: 0x76910000 - 0x76A05000 (C:\Windows\syswow64\WININET.dll)

CRYPT32.dll A: 0x76D30000 - 0x76E4D000 (C:\Windows\syswow64\CRYPT32.dll)

MSASN1.dll A: 0x761B0000 - 0x761BC000 (C:\Windows\syswow64\MSASN1.dll)

ntmarta.dll A: 0x74F90000 - 0x74FB1000 (C:\Windows\system32\ntmarta.dll)

WLDAP32.dll A: 0x76C20000 - 0x76C65000 (C:\Windows\syswow64\WLDAP32.dll)

VERSION.dll A: 0x73330000 - 0x73339000 (C:\Windows\system32\VERSION.dll)

SETUPAPI.dll A: 0x76E50000 - 0x76FED000 (C:\Windows\syswow64\SETUPAPI.dll)

CFGMGR32.dll A: 0x76BA0000 - 0x76BC7000 (C:\Windows\syswow64\CFGMGR32.dll)

DEVOBJ.dll A: 0x76760000 - 0x76772000 (C:\Windows\syswow64\DEVOBJ.dll)


Alguem ajuda achar a soluзгo??
Reply
#2

Acho que vocк se equivocou a falar samp server devido a existкncia de um arquivo com o mesmo nome.

Explique melhor. O samp-server fecha sozinho? Quando vocк entra no servidor crasha? Tentaste utilizar o Plugin CrashDetect?
Reply
#3

Quando o servidor bate um tempo on, tipo bate uns 20 on, ai o sampe server fecha sozinho, e usamos o CrashDetect
Reply
#4

Quote:
Originally Posted by ibob
Посмотреть сообщение
Quando o servidor bate um tempo on, tipo bate uns 20 on, ai o sampe server fecha sozinho, e usamos o CrashDetect
E apareceu algo no server.log ?
Reply
#5

Quote:

[01:40:56] [debug] Server crashed while executing roleplay.amx
[01:40:56] [debug] AMX backtrace:
[01:40:56] [debug] #0 native SetPlayerName () from sscanf.DLL
[01:40:56] [debug] #1 0008516c in public OnQueryFinished (2, 5) from roleplay.amx
[01:40:56] [debug] Native backtrace:
[01:40:56] [debug] #0 00468d34 in ?? () from samp-server.exe
[01:40:56] [debug] #1 00567049 in ?? () from plugins\sscanf.DLL
[01:40:56] [debug] #2 004010b6 in ?? () from samp-server.exe
[01:40:56] [debug] #3 72af62ca in AmxCallback () from plugins\crashdetect.DLL
[01:40:56] [debug] #4 72af8b28 in amx_Exec () from plugins\crashdetect.DLL
[01:40:56] [debug] #5 72af09c7 in CrashDetect:oAmxExec () from plugins\crashdetect.DLL
[01:40:56] [debug] #6 72af631a in AmxExec () from plugins\crashdetect.DLL
[01:40:56] [debug] #7 72a151b9 in ?? () from plugins\streamer.DLL
[01:40:56] [debug] #8 1000a0ec in ?? () from plugins\mysql.DLL
[01:40:56] [debug] #9 00469a66 in ?? () from samp-server.exe
[01:40:56] [debug] #10 0048d4db in ?? () from samp-server.exe
[01:40:56] [debug] #11 0049b4a1 in ?? () from samp-server.exe
[01:40:56] [debug] #12 0049b4b1 in ?? () from samp-server.exe

Oque seria isso?
Reply
#6

Mande seu server.cfg
Reply
#7

Quote:

echo Executing Server Config...
lanmode 0
rcon_password #####
maxplayers 70
port 7777
hostname Brasil Capital Paulista RolePlay
Language: Portuguкs Brasileiro PT:BR
gamemode0 roleplay
filterscripts
announce 1
query 1
weburl
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
plugins mysql sscanf crashdetect streamer Whirlpool nativechecker

Algo de errado?
Reply
#8

Pelo meu ver, a variбvel que estб no SetPlayerName estб provavelmente NULA. Mande a Callback OnQueryFinished.
Reply
#9

Quote:

forward OnQueryFinished(extraid, threadid);
public OnQueryFinished(extraid, threadid)
{
if (!IsPlayerConnected(extraid))
return 0;

static
rows,
fields
;
switch (threadid)
{
case THREAD_CREATE_CHAR:
{
PlayerData[extraid][pID] = mysql_insert_id();
PlayerData[extraid][pLogged] = 1;

SQL_SaveCharacter(extraid);

PlayerData[extraid][pID] = -1;
PlayerData[extraid][pLogged] = 0;
}
case THREAD_CHECK_ACCOUNT:
{
cache_get_data(rows, fields, g_iHandle);

if (rows)
{
static
loginDate[36];

cache_get_row(0, 0, loginDate, g_iHandle);

format(PlayerData[extraid][pLoginDate], 36, loginDate);
Dialog_Show(extraid, LoginScreen, DIALOG_STYLE_PASSWORD, "Login", "Bem-Vindo de volta a Brasil Capital Paulista - Roleplay!\n\nSua conta foi vista pela ъltima vez em: %s.\n\nPor favor, digite sua senha para logar:", "Logar", "Cancelar", PlayerData[extraid][pLoginDate]);
}
else
{
Dialog_Show(extraid, RegisterScreen, DIALOG_STYLE_PASSWORD, "Registrar Conta", "Bem-Vindo a Brasil Capital Paulista - Roleplay, %s.\n\nNoticia: Sua conta nгo estб registrada. Digite a senha desejada:", "Registrar", "Cancelar", ReturnName(extraid));
}
}
case THREAD_LOGIN:
{
cache_get_data(rows, fields, g_iHandle);

if (!rows)
{
PlayerData[extraid][pLoginAttempts]++;

if (PlayerData[extraid][pLoginAttempts] >= 3)
{
SendClientMessage(extraid, COLOR_LIGHTRED, "Noticia: Vocк foi kikado, por errar todas as tentativas de login.");
KickEx(extraid);
}
else
{
Dialog_Show(extraid, LoginScreen, DIALOG_STYLE_PASSWORD, "Login", "Bem-Vindo de volta a Brasil Capital Paulista - Roleplay!\n\nSua conta foi vista pela ъltima vez em: %s.\n\nPor favor, digite sua senha para logar:", "Logar", "Cancelar", PlayerData[extraid][pLoginDate]);
SendClientMessageEx(extraid, COLOR_LIGHTRED, "Noticia: Senha incorreta (%d/3 tentativas).", PlayerData[extraid][pLoginAttempts]);
}
}
else
{
static
query[128];

// Update the last login date.
format(query, sizeof(query), "UPDATE `accounts` SET `IP` = '%s', `LoginDate` = '%s' WHERE `Username` = '%s'", PlayerData[extraid][pIP], ReturnDate(), PlayerData[extraid][pUsername]);
mysql_function_query(g_iHandle, query, false, "", "");

// Load the character data.
format(query, sizeof(query), "SELECT * FROM `characters` WHERE `Username` = '%s' LIMIT 3", PlayerData[extraid][pUsername]);
mysql_function_query(g_iHandle, query, true, "OnQueryFinished", "dd", extraid, THREAD_CHARACTERS);
}
}
case THREAD_CHARACTERS:
{
cache_get_data(rows, fields, g_iHandle);

for (new i = 0; i < rows; i ++) {
cache_get_field_content(i, "Character", PlayerCharacters[extraid][i], g_iHandle);
}
ShowCharacterMenu(extraid);
}
case THREAD_LOAD_CHARACTER:
{
static
string[128];

cache_get_data(rows, fields, g_iHandle);

foreach (new i : Player)
{
if (PlayerData[i][pCharacter] == PlayerData[extraid][pCharacter] && !strcmp(ReturnName(i), PlayerCharacters[extraid][PlayerData[extraid][pCharacter] - 1]) && i != extraid)
{
ShowCharacterMenu(extraid);
SendErrorMessage(extraid, "Este personagem jб estб logado.");
}
}
switch (SetPlayerName(extraid, PlayerCharacters[extraid][PlayerData[extraid][pCharacter] - 1]))
{
case -1: {
SendClientMessageEx(extraid, COLOR_LIGHTRED, "Noticia: O nome do seu personagem jб esta em uso.");
}
default:
{
if (!rows) {
return 0;
}
static
query[128]
;
PlayerData[extraid][pID] = cache_get_field_int(0, "ID");
PlayerData[extraid][pCreated] = cache_get_field_int(0, "Created");
PlayerData[extraid][pGender] = cache_get_field_int(0, "Gender");

cache_get_field_content(0, "Birthdate", PlayerData[extraid][pBirthdate], g_iHandle);
cache_get_field_content(0, "Origin", PlayerData[extraid][pOrigin], g_iHandle);
PlayerData[extraid][pNomeOOC] = cache_get_field_int(0, "NomeOOC");

PlayerData[extraid][pSkin] = cache_get_field_int(0, "Skin");
PlayerData[extraid][pPos][0] = cache_get_field_float(0, "PosX");
PlayerData[extraid][pPos][1] = cache_get_field_float(0, "PosY");
PlayerData[extraid][pPos][2] = cache_get_field_float(0, "PosZ");
PlayerData[extraid][pPos][3] = cache_get_field_float(0, "PosA");
PlayerData[extraid][pHealth] = cache_get_field_float(0, "Health");
PlayerData[extraid][pInterior] = cache_get_field_int(0, "Interior");
PlayerData[extraid][pWorld] = cache_get_field_int(0, "World");
PlayerData[extraid][pHospital] = cache_get_field_int(0, "Hospital");
PlayerData[extraid][pHospitalInt] = cache_get_field_int(0, "HospitalInt");
PlayerData[extraid][pMoney] = cache_get_field_int(0, "Money");
PlayerData[extraid][pBankMoney] = cache_get_field_int(0, "BankMoney");
PlayerData[extraid][pOwnsBillboard] = cache_get_field_int(0, "OwnsBillboard");
PlayerData[extraid][pSavings] = cache_get_field_int(0, "Savings");
PlayerData[extraid][pAdmin] = cache_get_field_int(0, "Admin");
PlayerData[extraid][pJailTime] = cache_get_field_int(0, "JailTime");
PlayerData[extraid][pMuted] = cache_get_field_int(0, "Muted");
PlayerData[extraid][pTester] = cache_get_field_int(0, "Tester");
PlayerData[extraid][pHouse] = cache_get_field_int(0, "House");
PlayerData[extraid][pBusiness] = cache_get_field_int(0, "Business");
PlayerData[extraid][pEntrance] = cache_get_field_int(0, "Entrance");
PlayerData[extraid][pPhone] = cache_get_field_int(0, "Phone");
PlayerData[extraid][pLottery] = cache_get_field_int(0, "Lottery");
PlayerData[extraid][pLottery] = cache_get_field_int(0, "LotteryB");
PlayerData[extraid][pHunger] = cache_get_field_int(0, "Hunger");
PlayerData[extraid][pThirst] = cache_get_field_int(0, "Thirst");
PlayerData[extraid][pPlayingHours] = cache_get_field_int(0, "PlayingHours");
PlayerData[extraid][pMinutes] = cache_get_field_int(0, "Minutes");
PlayerData[extraid][pArmorStatus] = cache_get_field_float(0, "ArmorStatus");
PlayerData[extraid][pJob] = cache_get_field_int(0, "Job");
PlayerData[extraid][pFactionID] = cache_get_field_int(0, "Faction");
PlayerData[extraid][pFactionRank] = cache_get_field_int(0, "FactionRank");
PlayerData[extraid][pPrisoned] = cache_get_field_int(0, "Prisoned");
PlayerData[extraid][pInjured] = cache_get_field_int(0, "Injured");
PlayerData[extraid][pWarrants] = cache_get_field_int(0, "Warrants");
PlayerData[extraid][pChannel] = cache_get_field_int(0, "Channel");
PlayerData[extraid][pBleeding] = cache_get_field_int(0, "Bleeding");
PlayerData[extraid][pAdminHide] = cache_get_field_int(0, "AdminHide");
PlayerData[extraid][pWarnings] = cache_get_field_int(0, "Warnings");
PlayerData[extraid][pMaskID] = cache_get_field_int(0, "MaskID");
PlayerData[extraid][pFactionMod] = cache_get_field_int(0, "FactionMod");
PlayerData[extraid][pCapacity] = cache_get_field_int(0, "Capacity");
PlayerData[extraid][pSpawnPoint] = cache_get_field_int(0, "SpawnPoint");

cache_get_field_content(0, "Warn1", PlayerData[extraid][pWarn1], g_iHandle);
cache_get_field_content(0, "Warn2", PlayerData[extraid][pWarn2], g_iHandle);

for (new i = 0; i < 13; i ++) {
format(query, sizeof(query), "Gun%d", i + 1);
PlayerData[extraid][pGuns][i] = cache_get_field_int(0, query);

format(query, sizeof(query), "Ammo%d", i + 1);
PlayerData[extraid][pAmmo][i] = cache_get_field_int(0, query);
}
PlayerData[extraid][pGlasses] = cache_get_field_int(0, "Glasses");
PlayerData[extraid][pHat] = cache_get_field_int(0, "Hat");
PlayerData[extraid][pBandana] = cache_get_field_int(0, "Bandana");

cache_get_field_content(0, "GlassesPos", string, g_iHandle);
sscanf(string, "p<|>fffffffff", AccessoryData[extraid][0][0], AccessoryData[extraid][0][1], AccessoryData[extraid][0][2], AccessoryData[extraid][0][3], AccessoryData[extraid][0][4], AccessoryData[extraid][0][5], AccessoryData[extraid][0][6], AccessoryData[extraid][0][7], AccessoryData[extraid][0][8]);

cache_get_field_content(0, "HatPos", string, g_iHandle);
sscanf(string, "p<|>fffffffff", AccessoryData[extraid][1][0], AccessoryData[extraid][1][1], AccessoryData[extraid][1][2], AccessoryData[extraid][1][3], AccessoryData[extraid][1][4], AccessoryData[extraid][1][5], AccessoryData[extraid][1][6], AccessoryData[extraid][1][7], AccessoryData[extraid][1][8]);

cache_get_field_content(0, "BandanaPos", string, g_iHandle);
sscanf(string, "p<|>fffffffff", AccessoryData[extraid][2][0], AccessoryData[extraid][2][1], AccessoryData[extraid][2][2], AccessoryData[extraid][2][3], AccessoryData[extraid][2][4], AccessoryData[extraid][2][5], AccessoryData[extraid][2][6], AccessoryData[extraid][2][7], AccessoryData[extraid][2][8]);

if (!PlayerData[extraid][pMaskID])
PlayerData[extraid][pMaskID] = random(90000) + 10000;

if (!PlayerData[extraid][pCapacity])
PlayerData[extraid][pCapacity] = 35;

for (new i = 0; i < 81; i ++) {
if (i < 8 || (i >= 71 && i <= 80)) PlayerTextDrawHide(extraid, PlayerData[extraid][pTextdraws][i]);
}
if (PlayerData[extraid][pTester] > 0)
{
SendClientMessage(extraid, COLOR_CYAN, "[SERVER]:{FFFFFF} Vocк logou como um tester.");
}
if (PlayerData[extraid][pAdmin] > 0)
{
SendAdminAction(extraid, "Vocк logou com o level %d de admin.", PlayerData[extraid][pAdmin]);
}
SendClientMessageEx(extraid, COLOR_BLUE, "Olб %s, seja bem vindo qualquer dъvida, /sos.", ReturnName(extraid, 0));
PlayerData[extraid][pLogged] = 1;
SetPlayerColor(extraid, DEFAULT_COLOR);
format(query, sizeof(query), "SELECT * FROM `inventory` WHERE `ID` = '%d'", PlayerData[extraid][pID]);
mysql_function_query(g_iHandle, query, true, "OnQueryFinished", "dd", extraid, THREAD_LOAD_INVENTORY);

format(query, sizeof(query), "SELECT * FROM `contacts` WHERE `ID` = '%d'", PlayerData[extraid][pID]);
mysql_function_query(g_iHandle, query, true, "OnQueryFinished", "dd", extraid, THREAD_LOAD_CONTACTS);

format(query, sizeof(query), "SELECT * FROM `tickets` WHERE `ID` = '%d'", PlayerData[extraid][pID]);
mysql_function_query(g_iHandle, query, true, "OnQueryFinished", "dd", extraid, THREAD_LOAD_TICKETS);

format(query, sizeof(query), "SELECT * FROM `gps` WHERE `ID` = '%d'", PlayerData[extraid][pID]);
mysql_function_query(g_iHandle, query, true, "OnQueryFinished", "dd", extraid, THREAD_LOAD_LOCATIONS);

if(PlayerData[extraid][pOwnsBillboard] == 0)
{
PlayerData[extraid][pOwnsBillboard] = -1;
}
if (PlayerData[extraid][pFactionID] != -1) {
PlayerData[extraid][pFaction] = GetFactionByID(PlayerData[extraid][pFactionID]);

if (PlayerData[extraid][pFaction] == -1) {
ResetFaction(extraid);
}
}
if (!PlayerData[extraid][pCreated])
{
new
str[48];

format(str, sizeof(str), "~r~Nome:~w~ %s", ReturnName(extraid));
PlayerTextDrawSetString(extraid, PlayerData[extraid][pTextdraws][14], str);

for (new i = 11; i < 23; i ++) {
PlayerTextDrawShow(extraid, PlayerData[extraid][pTextdraws][i]);
}
PlayerData[extraid][pSkin] = 98;

PlayerData[extraid][pOrigin][0] = '\0';
PlayerData[extraid][pBirthdate][0] = '\0';

SendServerMessage(extraid, "Vocк й obrigado a preencher todos os campos.");
SetPlayerInterior(extraid, 3);

SetPlayerPos(extraid, 364.958312, 173.570709, 990.610534);
SetPlayerCameraPos(extraid, 364.958312, 173.570709, 1010.610534);
SetPlayerCameraLookAt(extraid, 364.458343, 173.576049, 1010.389343);
}
else
{
SetSpawnInfo(extraid, 0, PlayerData[extraid][pSkin], PlayerData[extraid][pPos][0], PlayerData[extraid][pPos][1], PlayerData[extraid][pPos][2], 0.0, 0, 0, 0, 0, 0, 0);

TogglePlayerSpectating(extraid, 0);
TogglePlayerControllable(extraid, 0);

CancelSelectTextDraw(extraid);
SetTimerEx("SpawnTimer", 1000, false, "d", extraid);
StopAudioStreamForPlayer(extraid);
}
}
}
}
case THREAD_VERIFY_PASS:
{
cache_get_data(rows, fields, g_iHandle);

if (rows)
Dialog_Show(extraid, NewPass, DIALOG_STYLE_PASSWORD, "Insira A Nova Senha", "Digite sua nova senha abaixo.\n\nNota: Por favor, use uma senha forte e segura para seguranзa adicional.", "Mudar", "Cancelar");

else
SendErrorMessage(extraid, "Vocк digitou uma senha incorreta.");
}
case THREAD_FIND_USERNAME:
{
static
query[128];

cache_get_data(rows, fields, g_iHandle);

if (rows)
{
new
name[MAX_PLAYER_NAME + 1];

cache_get_row(0, 0, name, g_iHandle);

if (strcmp(name, PlayerData[extraid][pUsername], false) != 0)
{
format(PlayerData[extraid][pUsername], sizeof(name), name);
SetPlayerName(extraid, name);
}
}
format(query, sizeof(query), "SELECT `LoginDate` FROM `accounts` WHERE `Username` = '%s'", PlayerData[extraid][pUsername]);
mysql_function_query(g_iHandle, query, true, "OnQueryFinished", "dd", extraid, THREAD_CHECK_ACCOUNT);
}
case THREAD_LOAD_INVENTORY:
{
static
name[32];

cache_get_data(rows, fields, g_iHandle);

for (new i = 0; i < rows && i < MAX_INVENTORY; i ++) {
InventoryData[extraid][i][invExists] = true;
InventoryData[extraid][i][invID] = cache_get_field_int(i, "invID");
InventoryData[extraid][i][invModel] = cache_get_field_int(i, "invModel");
InventoryData[extraid][i][invQuantity] = cache_get_field_int(i, "invQuantity");

cache_get_field_content(i, "invItem", name, g_iHandle);
strpack(InventoryData[extraid][i][invItem], name, 32 char);
}
}
case THREAD_LOAD_CONTACTS:
{
cache_get_data(rows, fields, g_iHandle);

for (new i = 0; i < rows && i < MAX_CONTACTS; i ++) {
cache_get_field_content(i, "contactName", ContactData[extraid][i][contactName], g_iHandle);

ContactData[extraid][i][contactExists] = true;
ContactData[extraid][i][contactID] = cache_get_field_int(i, "contactID");
ContactData[extraid][i][contactNumber] = cache_get_field_int(i, "contactNumber");
}
}
case THREAD_LOAD_LOCATIONS:
{
cache_get_data(rows, fields, g_iHandle);

for (new i = 0; i < rows && i < MAX_GPS_LOCATIONS; i ++) {
cache_get_field_content(i, "locationName", LocationData[extraid][i][locationName], g_iHandle);

LocationData[extraid][i][locationExists] = true;
LocationData[extraid][i][locationID] = cache_get_field_int(i, "locationID");
LocationData[extraid][i][locationPos][0] = cache_get_field_float(i, "locationX");
LocationData[extraid][i][locationPos][1] = cache_get_field_float(i, "locationY");
LocationData[extraid][i][locationPos][2] = cache_get_field_float(i, "locationZ");
}
}
case THREAD_LOAD_TICKETS:
{
cache_get_data(rows, fields, g_iHandle);

for (new i = 0; i < rows && i < MAX_PLAYER_TICKETS; i ++) {
cache_get_field_content(i, "ticketReason", TicketData[extraid][i][ticketReason], g_iHandle);
cache_get_field_content(i, "ticketDate", TicketData[extraid][i][ticketDate], g_iHandle);

TicketData[extraid][i][ticketExists] = true;
TicketData[extraid][i][ticketID] = cache_get_field_int(i, "ticketID");
TicketData[extraid][i][ticketFee] = cache_get_field_int(i, "ticketFee");
}
}
case THREAD_BAN_LOOKUP:
{
new
reason[128],
date[36],
username[24];

cache_get_data(rows, fields, g_iHandle);

if (rows) {
cache_get_field_content(0, "Username", username, g_iHandle);
cache_get_field_content(0, "Date", date, g_iHandle);
cache_get_field_content(0, "Reason", reason, g_iHandle);

if (!strcmp(username, "null", true) || !username[0])
{
Dialog_Show(extraid, ShowOnly, DIALOG_STYLE_MSGBOX, "Noticia do Ban", "Seu IP estб banido de nosso servidor.\n\nIP: %s\nData: %s\nMotivo: %s\n\nPara solicitar seu ban appeal's, acesse o nosso fуrum.", "Fechar", "", PlayerData[extraid][pIP], date, reason);
KickEx(extraid);
}
else
{
Dialog_Show(extraid, ShowOnly, DIALOG_STYLE_MSGBOX, "Noticia do Ban", "Vocк foi banido de nosso servidor.\n\nUsername: %s\nData: %s\nMotivo: %s\n\nPara solicitar seu ban appeal's, acesse o nosso fуrum.", "Fechar", "", PlayerData[extraid][pUsername], date, reason);
KickEx(extraid);
}
}
}
case THREAD_SHOW_CHARACTER:
{
cache_get_data(rows, fields, g_iHandle);

if (rows)
{
static
skin,
birthdate[16],
origin[32],
string[128];

skin = cache_get_field_int(0, "Skin");

cache_get_field_content(0, "Birthdate", birthdate, g_iHandle);
cache_get_field_content(0, "Origin", origin, g_iHandle);

PlayerTextDrawSetPreviewModel(extraid, PlayerData[extraid][pTextdraws][73], skin);

if (!strlen(birthdate)) {
birthdate = "Not Specified";
}
if (!strlen(origin)) {
origin = "Not Specified";
}
format(string, sizeof(string), "~b~Nascimento:~w~ %s", birthdate);
PlayerTextDrawSetString(extraid, PlayerData[extraid][pTextdraws][74], string);

format(string, sizeof(string), "~b~Pais:~w~ %s", origin);
PlayerTextDrawSetString(extraid, PlayerData[extraid][pTextdraws][75], string);

format(string, sizeof(string), "~b~Criacao:~w~ %s", GetDuration(gettime() - cache_get_field_int(0, "CreateDate")));
PlayerTextDrawSetString(extraid, PlayerData[extraid][pTextdraws][76], string);

format(string, sizeof(string), "~b~Horas:~w~ %s", GetDuration(gettime() - cache_get_field_int(0, "LastLogin")));
PlayerTextDrawSetString(extraid, PlayerData[extraid][pTextdraws][77], string);

for (new i = 0; i < 8; i ++) {
PlayerTextDrawHide(extraid, PlayerData[extraid][pTextdraws][i]);
}
for (new i = 71; i < 81; i ++) {
PlayerTextDrawShow(extraid, PlayerData[extraid][pTextdraws][i]);
}
}
}
}
return 1;
}

Esta ai ^^
Reply
#10

Agora й seu dever de aprender a mexer com DEBUG.

Provavelmente o erro estб aqui:

PHP код:
format(PlayerData[extraid][pUsername], sizeof(name), name);
SetPlayerName(extraidname);
// Ou aqui
switch (SetPlayerName(extraidPlayerCharacters[extraid][PlayerData[extraid][pCharacter] - 1])) 
1 - Primeiro passo й vocк colocar OnQueryFinished(playerid) no OnPlayerConnect, ou melhor, fazer algo que faz chamar essa funзгo. Provavelmente o servidor vai cair e vocк vai ter certeza que aн que estб o problema.
2 -Comente a linha SetPlayerName(extraid, name); e compile o GameMode. Volte no servidor e veja se o servidor continua caindo.
3 - Muito pouco provбvel que ele continue caindo. Mas caso aconteзa, vб para o prуximo passo.
4 - Faзa substituiзгo:
PHP код:
switch (SetPlayerName(extraidPlayerCharacters[extraid][PlayerData[extraid][pCharacter] - 1]))
// Por
new nometeste;
switch(
nometeste
Eu fiz assim porque quero que vocк compreenda a detectar os erros sozinho. Quando terminar, volte aqui e diga qual vocк teve que comentar que fez o servidor parar de cair.

PS: Ignore os avisos de nгo estб sendo usado e outros do compilador. No DEBUG й desnecessбrio..
Reply


Forum Jump:


Users browsing this thread: