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.
Код:
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;
}
I've fixed my issue. I had forgotten to make my contacts folder inside /scriptfiles accidentally. Stupid I must be.