public OnPlayerSpawn(playerid)
{
if(!PlayerInfo[playerid][IsJailed])
{
if(SpawnType[playerid] == SPAWNMODE_DEFAULT)
{
new
Float:x, Float:y, Float:z, bool:found;
if(gTeam[playerid] == TEAM_USA)
{
for(new i = 1; i < MAX_VEHICLES; i++)
{
if(HydraInUse{ i } || IsVehicleOccupied(i)) continue;
else if(i > 23) break;
GetVehiclePos(i, x, y, z), found = true;
break;
}
SetPlayerColor(playerid, COLOR_USA);
}
else if(gTeam[playerid] == TEAM_RUSSIA)
{
for(new i = 24; i < MAX_VEHICLES; i++)
{
if(HydraInUse{ i } || IsVehicleOccupied(i)) continue;
else if(i >= 45) break;
GetVehiclePos(i, x, y, z), found = true;
break;
}
SetPlayerColor(playerid, COLOR_RUSSIA);
}
SetPlayerInterior(playerid, 0), SetPlayerVirtualWorld(playerid, 0);
GivePlayerWeaponEx(playerid, 24, 1500);
GivePlayerWeaponEx(playerid, WEAPON_SHOTGSPA, 1500);
GivePlayerWeaponEx(playerid, WEAPON_M4, 1500), GivePlayerWeaponEx(playerid, WEAPON_SNIPER, 100);
GivePlayerWeaponEx(playerid, WEAPON_GRENADE, 3), GivePlayerWeaponEx(playerid, WEAPON_ROCKETLAUNCHER, 1);
SetPlayerHealth(playerid, 99), SetPlayerArmour(playerid, 99);
if(found) SetPlayerPos(playerid, x, y, z+4);
else
{
if(gTeam[playerid] == TEAM_USA) SetPlayerPos(playerid, 279.4629, 2030.1803, 18.2025);
else if(gTeam[playerid] == TEAM_RUSSIA) SetPlayerPos(playerid, -1257.1313, 203.0132, 15.0607);
}
}
else if(SpawnType[playerid] == SPAWNMODE_STUNT)
{
SetPlayerSkin(playerid, 3);
SetPlayerVirtualWorld(playerid, 155), ResetPlayerWeapons(playerid), SetPlayerPos(playerid, -1296.5253,4.3884,14.1484);
SetPlayerColor(playerid, COLOR_GRAY);
gTeam[playerid] = NO_TEAM;
SetPlayerTeam(playerid, gTeam[playerid]);
SetPlayerHealth(playerid, 999999);
SetPlayerArmour(playerid, 999999);
}
FixTeams(), FixSelections();
}
else
{
SetPlayerInterior(playerid, 10);
new rnd = random(sizeof(JailSpawnPoints));
SetPlayerPos(playerid, JailSpawnPoints[rnd][0], JailSpawnPoints[rnd][1], JailSpawnPoints[rnd][2]);
SetPlayerFacingAngle(playerid, JailSpawnPoints[rnd][3]);
SetPlayerColor(playerid, COLOR_GREY);
JailTimer[playerid] = SetTimerEx("JailT", 60000, false, "i", playerid), TimeInJail[playerid] = 60000;
SendClientMessage(playerid, COLOR_NOTES2, "JAIL: You will be released in 60 seconds");
}
dueling{ playerid } = false, DuelInfo[playerid][targetid] = INVALID_PLAYER_ID, DuelInfo[playerid][HydraDuel] = false;
TextDrawHideForPlayer(playerid, VehicleInfo[playerid]), TextDrawHideForPlayer(playerid, VehicleBox[playerid]);
CapturingZone[playerid] = ZONE_NONE, InZone[playerid] = ZONE_NONE, PlayerHydra[playerid] = INVALID_VEHICLE_ID, IsSpectating{ playerid } = false, SpectatingTarget[playerid] = INVALID_PLAYER_ID;
TextDrawHideForPlayer(playerid, SpectateInfo[playerid]);
for(new line=0; line < 6; line++) TextDrawShowForPlayer(playerid, BoxMsg[line]); //2494
return 1;
}
It seems that one array is causing the problem in both callbacks
Go through both of ur callbacks and note the arrays common in them Then see if common arrays are declared properly or not[their array size]... If this doesn't work then after each line do print("LINE NO HERE"); Then execute the script and you will know exact line of error |