14.04.2016, 01:56
Hey I've updated my script and I've been having issues and once a character joins the server it'll crash instantly. I've got the log from crashdetect
I've got a feeling it's something related to OnPlayerSpawner so I've included it.
Any sort of assistance will be greatly appreciated.
Код:
[11:53:33] [debug] Server crashed while executing dsrplatest.amx [11:53:33] [debug] AMX backtrace: [11:53:33] [debug] #0 native fread () from samp-server.exe [11:53:33] [debug] #1 00537f80 in ?? (0) from dsrplatest.amx [11:53:33] [debug] #2 00067ab4 in public OnPlayerSpawn (0) from dsrplatest.amx [11:53:33] [debug] Native backtrace: [11:53:33] [debug] #0 77769f83 in ?? () from C:\WINDOWS\SYSTEM32\ntdll.dll [11:53:33] [debug] #1 00498bb8 in ?? () from samp-server.exe [11:53:33] [debug] #2 004991e0 in ?? () from samp-server.exe [11:53:33] [debug] #3 00404f14 in ?? () from samp-server.exe [11:53:33] [debug] Server crashed while executing dsrplatest.amx [11:53:33] [debug] AMX backtrace: [11:53:33] [debug] #0 native fread () from samp-server.exe [11:53:33] [debug] #1 00537f80 in ?? (0) from dsrplatest.amx [11:53:33] [debug] #2 00067ab4 dsrplatest.amx [11:53:33] [debug] Native backtrace: [11:53:33] [debug] #0 7775c1ad in ?? () from C:\WINDOWS\SYSTEM32\ntdll.dll [11:53:33] [debug] #1 7775b4c8 in ?? () from C:\WINDOWS\SYSTEM32\ntdll.dll [11:53:33] [debug] #2 00498e11 in ?? () from samp-server.exe [11:53:33] [debug] #3 0044d9c9 in ?? () from samp-server.exe [11:53:33] [debug] #4 0045856c in ?? () from samp-server.exe [11:53:33] [debug] #5 0045ad2a in ?? () from samp-server.exe [11:53:33] [debug] #6 5cd97c09 in ?? () from plugins\crashdetect.DLL [11:53:33] [debug] #7 77796bfc in ?? () from C:\WINDOWS\SYSTEM32\ntdll.dll [11:53:33] [debug] #8 76d5e1d1 in ?? () from C:\WINDOWS\SYSTEM32\KERNELBASE.dll [11:53:33] [debug] #9 76d5e1ee in ?? () from C:\WINDOWS\SYSTEM32\KERNELBASE.dll
Код:
public OnPlayerSpawn(playerid) { if(!gPlayerLogged{playerid}) { SendClientMessageEx(playerid, COLOR_WHITE, "ERROR: You are not logged in!"); Kick(playerid); return 1; } LoadContacts(playerid); Streamer_Update(playerid); if(GetPVarInt(playerid, "NGPassenger") == 1) { new Float:X, Float:Y, Float:Z; GetVehiclePos(GetPVarInt(playerid, "NGPassengerVeh"), X, Y, Z); SetPlayerPos(playerid, (X-2.557), (Y-3.049), Z); SetPlayerWeaponsEx(playerid); GivePlayerValidWeapon(playerid, 46, 60000); SetPlayerSkin(playerid, GetPVarInt(playerid, "NGPassengerSkin")); SetPlayerHealth(playerid, GetPVarFloat(playerid, "NGPassengerHP")); SetPlayerArmour(playerid, GetPVarFloat(playerid, "NGPassengerArmor")); DeletePVar(playerid, "NGPassenger"); DeletePVar(playerid, "NGPassengerVeh"); DeletePVar(playerid, "NGPassengerArmor"); DeletePVar(playerid, "NGPassengerHP"); DeletePVar(playerid, "NGPassengerSkin"); return 1; } if(InsideShamal[playerid] != INVALID_VEHICLE_ID) { SetPlayerPos(playerid, GetPVarFloat(playerid, "air_Xpos"), GetPVarFloat(playerid, "air_Ypos"), GetPVarFloat(playerid, "air_Zpos")); SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "air_Rpos")); SetPlayerHealth(playerid, GetPVarFloat(playerid, "air_HP")); SetPlayerArmour(playerid, GetPVarFloat(playerid, "air_Arm")); SetPlayerWeaponsEx(playerid); SetPlayerToTeamColor(playerid); SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); DeletePVar(playerid, "air_Xpos"); DeletePVar(playerid, "air_Ypos"); DeletePVar(playerid, "air_Zpos"); DeletePVar(playerid, "air_Rpos"); DeletePVar(playerid, "air_HP"); DeletePVar(playerid, "air_Arm"); SetCameraBehindPlayer(playerid); SetPlayerVirtualWorld(playerid, InsideShamal[playerid]); return SetPlayerInterior(playerid, 1); } SyncPlayerTime(playerid); if(IsPlayerNPC(playerid)) return 1; SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]); STDPlayer[playerid] = 0; gTeam[playerid] = PlayerInfo[playerid][pTeam]; if(!gPlayerLogged{playerid}) return Kick(playerid); SetPlayerSpawn(playerid); SetPlayerWeapons(playerid); SetPlayerToTeamColor(playerid); CheckPH(playerid); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1); return 1; }