29.08.2013, 20:54
[I]Nem preciso falar nada... cуdigo esta dando Crash sу isso... trago tambйm cуdigos acima й a baixo... Public CronServer...
Host vai fechar 01/09/13 e meu server ta crashando
pawn Код:
public RespawnSystem(playerid)
{
new string[256];
LoadTextDraws();
Load3DTextsFix();
LoadCheckpointsFix();
LoadGangZonesFix();
LoadMapIconsFix();
LoadPickupsFix();
LoadObjectsFix();
LoadVehiclesFix();
LoadFilesIniItens();
LoadDynamicObjectsFromFile("Objetos/Bases.txt");
LoadDynamicObjectsFromFile("Objetos/Casas.txt");
LoadDynamicObjectsFromFile("Objetos/Dten.txt");
LoadDynamicObjectsFromFile("Objetos/Games.txt");
LoadDynamicObjectsFromFile("Objetos/Jump.txt");
LoadDynamicObjectsFromFile("Objetos/Outros.txt");
LoadStaticVehiclesFromFile("Conce/setados.txt");
LoadStaticVehiclesFromFile("vehicles/trains.txt");
//LoadStaticVehiclesFromFile("vehicles/pilots.txt");
LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
//LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
//LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");
LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
//LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
//LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");
LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
//LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
//LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
//LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");
//LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
//LoadStaticVehiclesFromFile("vehicles/bone.txt");
//LoadStaticVehiclesFromFile("vehicles/flint.txt");
//LoadStaticVehiclesFromFile("vehicles/tierra.txt");
//LoadStaticVehiclesFromFile("vehicles/red_county.txt");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
LoadPlayerTextDraws(i);
PlayerTextDrawShow(i, PlayerInfo[i][AreaName]);
#if defined gText1User
PlayerTextDrawShow(i, PlayerInfo[i][gText1]);
#endif
#if defined gText2User
PlayerTextDrawShow(i, PlayerInfo[i][gText2]);
#endif
TextDrawShowForPlayer(i, Relogio);
if(AFK[playerid] == 1)
{
TextDrawShowForPlayer(i, AfkText);
TextDrawShowForPlayer(i, AfkBackText);
}
GangZoneShowForPlayer(i, GangZonesFix[1], Vermelho);
GangZoneShowForPlayer(i, GangZonesFix[2], Vermelho);
GangZoneShowForPlayer(i, GangZonesFix[3], Vermelho);
GangZoneShowForPlayer(i, GangZonesFix[4], Vermelho);
GangZoneShowForPlayer(i, GangZonesFix[5], Vermelho);
GangZoneShowForPlayer(i, GangZonesFix[6], Verde);
GangZoneShowForPlayer(i, GangZonesFix[7], Branco);
GangZoneShowForPlayer(i, GangZonesFix[8], Branco);
GangZoneShowForPlayer(i, GangZonesFix[9], Branco);
}
}
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s (%d) recarregou todos itens do servidor.", pname, playerid);
SendClientMessageToAll(tcadm, string);
format(string, sizeof(string), "{FFFFFF}Total de Objetos: %d\n{FFFFFF}Total de Pickups: %d\n{FFFFFF}Total de Checkpoints: %d\n{FFFFFF}Total de Race Checkpoints: %d\n{FFFFFF}Total de MapIcons: %d\n{FFFFFF}Total de TextLabels: %d\n{FFFFFF}Total de Areas: %d", CountDynamicObjects(), CountDynamicPickups(), CountDynamicCPs(), CountDynamicRaceCPs(), CountDynamicMapIcons(), CountDynamic3DTextLabels(), CountDynamicAreas());
ShowPlayerDialog(playerid, rmovinfo, DIALOG_STYLE_MSGBOX, "Total de Itens do Servidor", string, "OK", "");
return 0;
}
public CronServe() //public que acusa no LOG
{
new string[256];
minu++;
if(horas == 0)
{
SetWorldTime(0);
Faculdade2 = 0;
}
if(minu >= 59)
{
minu = 0;
horas++;
SetWorldTime(horas);
}
if(horas > 23)
{
horas = 0;
}
if(Relogio != Text:INVALID_TEXT_DRAW)
{
format(string, 25, "~w~%02d~g~:~w~%02d", horas, minu);
TextDrawSetString(Relogio, string);
}
if(horas == 9 && minu == 00)
{
Faculdade2 = 1;
GameTextForAll("~w~Faculdade ~p~Aberta!", 6000, 1);
}
if(horas == 12 && minu == 00)
{
Faculdade2 = 0;
GameTextForAll("~w~Faculdade ~p~Fechada!", 6000, 1);
}
if(horas == 14 && minu == 00)
{
Faculdade2 = 1;
GameTextForAll("~w~Faculdade ~p~Aberta!", 6000, 1);
}
if(horas == 17 && minu == 00)
{
Faculdade2 = 0;
GameTextForAll("~w~Faculdade ~p~Fechada!", 6000, 1);
}
if(horas == 21 && minu == 00)
{
Faculdade2 = 1;
GameTextForAll("~w~Faculdade ~p~Aberta!", 6000, 1);
}
if(horas == 24 && minu == 30)
{
Faculdade2 = 0;
GameTextForAll("~w~Faculdade ~p~Fechada!", 6000, 1);
}
if(horas == 15 && minu == 00)
{
print("Salбrio pago ao(s) empregado(s) online!");
Up();
}
totalon = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
print("susseso");
if(IsPlayerConnected(i))
{
print("susseso 1.1");
if(GetPlayerMoney(i) != GetPlayerGrana(i))
{
ResetPlayerMoney(i);
GivePlayerMoney(i, GetPlayerGrana(i));
}
GetPlayerPos(i, PlayerCurrentPos[0], PlayerCurrentPos[1], PlayerCurrentPos[2]);
print("17");
if(!floatcmp(PlayerCurrentPos[0], PlayerLastPos[i][LastX]) && !floatcmp(PlayerCurrentPos[1], PlayerLastPos[i][LastY]))
{
PlayerAfkTicks[i]++;
}
else
{
PlayerAfkTicks[i] = 0;
}
PlayerLastPos[i][LastX] = PlayerCurrentPos[0];
PlayerLastPos[i][LastY] = PlayerCurrentPos[1];
PlayerLastPos[i][LastZ] = PlayerCurrentPos[2];
print("18");
if(PlayerAfkTicks[i] == MAX_IDLE_TIME*60 && PlayerInfo[i][Logged] == 1)
{
AFK[i] = 1;
SetPlayerVirtualWorld(i, 1);
SetCameraBehindPlayer(i);
TogglePlayerControllable(i, 0);
TextDrawShowForPlayer(i, AfkText);
TextDrawShowForPlayer(i, AfkBackText);
format(string, sizeof(string), "%s estб ausente e foi impedido(a) de upar!", GetPlayerNameEx(i));
SendClientMessageToAll(0xFF9595AA, string);
}
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(i));
print("19");
if(dini_Exists(file))
{
new Float:health;
GetPlayerHealth(i, health);
print("20");
dini_IntSet(file, "Matou", matou[i]);
dini_IntSet(file, "Morreu", morreu[i]);
print("21");
if(dini_Int(file, "usoudroga") == 1)
{
SetPlayerHealth(i, health-2);
}
print("22");
if(dini_Int(file, "Level") > MAX_PLAYER_LEVEL-1)
{
dini_IntSet(file, "Level", MAX_PLAYER_LEVEL);
}
print("23");
if(dini_Int(file, "Faculdade") > MAX_PLAYER_ESTUDO-1)
{
dini_IntSet(file, "Faculdade", MAX_PLAYER_ESTUDO);
}
print("24");
if(pAdmin[i] > 0)
{
dini_IntSet(file, "Admin", pAdmin[i]);
}
}
}
}
return 1;
}
public locais()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
// ================================ Бreas Pъblicas =================================
if(IsPlayerInPlace(i, 1383.386, -1772.66, 1596.345, -1583.168) // pref
|| IsPlayerInPlace(i, 1048.736, -1745.026, 1189.441, -1693.705) // bi
|| IsPlayerInPlace(i, 1178.033, -1875.301, 1345.357, -1705.548) // facul
|| PlayerToPoint(30.0, i, 370.7215, 173.7653, 1008.3828) // iPref
|| PlayerToPoint(30.0, i, 246.3227, 79.6510, 1003.6406) // iDp
|| PlayerToPoint(30.0, i, 829.5621, 4.8665, 1004.1870)) // iBanco
{
DMBloqueado[i] = 1;
}
else
{
if(DMBloqueado[i] == 1)
{
DMBloqueado[i] = 0;
}
}
// ============================== Base Swat =======================================
if(IsPlayerInPlace(i, 1101.976, -2096.375, 1318.738, -1993.733))
{
DMLiberado[i][0] = 1;
GangZoneFlashForAll(GangZonesFix[4], BRANCO);
}
else
{
if(DMLiberado[i][0] == 1)
{
DMLiberado[i][0] = 0;
GangZoneStopFlashForAll(GangZonesFix[4]);
}
}
// ============================== Skatistas =======================================
if(IsPlayerInPlace(i, 1821.749, -1483.09, 2113.696, -1331.278))
{
DMLiberado[i][1] = 1;
GangZoneFlashForAll(GangZonesFix[6], BRANCO);
}
else
{
if(DMLiberado[i][1] == 1)
{
DMLiberado[i][1] = 0;
GangZoneStopFlashForAll(GangZonesFix[6]);
}
}
// ================================ Base COT =========================================
if(IsPlayerInPlace(i, 2649.73,-2593.79,2794.238,-2337.187))
{
DMLiberado[i][2] = 1;
GangZoneFlashForAll(GangZonesFix[5], BRANCO);
}
else
{
if(DMLiberado[i][2] == 1)
{
DMLiberado[i][2] = 0;
GangZoneStopFlashForAll(GangZonesFix[5]);
}
}
// ================================ Favela =========================================
if(IsPlayerInPlace(i, 2016.010, -1161.922, 2324.010, -923.518))
{
DMLiberado[i][3] = 1;
GangZoneFlashForAll(GangZonesFix[1], BRANCO);
}
else
{
if(DMLiberado[i][3] == 1)
{
DMLiberado[i][3] = 0;
GangZoneStopFlashForAll(GangZonesFix[1]);
}
}
// ============================== Navio DM =========================================
if(IsPlayerInPlace(i, -2545.777, 1483.09, -2230.474, 1623.225))
{
DMLiberado[i][4] = 1;
GangZoneFlashForAll(GangZonesFix[2], BRANCO);
}
else
{
if(DMLiberado[i][4] == 1)
{
DMLiberado[i][4] = 0;
GangZoneStopFlashForAll(GangZonesFix[2]);
}
}
// ============================== Area DM LV =======================================
if(IsPlayerInPlace(i, 1267.535, 2084.409, 1408.109, 2235.263))
{
DMLiberado[i][5] = 1;
GangZoneFlashForAll(GangZonesFix[3], BRANCO);
}
else
{
if(DMLiberado[i][5] == 1)
{
DMLiberado[i][5] = 0;
GangZoneStopFlashForAll(GangZonesFix[3]);
}
}
// =========================== Postos de Combustнvel ==============================
// Postos em FC
if(PlayerToPoint(7.0, i, 70.4532, 1219.1954, 18.8117)
|| PlayerToPoint(7.0, i, -90.2719, -1169.9579, 2.3964)
|| PlayerToPoint(7.0, i, -2411.5728, 976.1896, 45.4609)
|| PlayerToPoint(7.0, i, 2114.8413, 919.9194, 10.8203))
{
GameTextForPlayer(i, "~r~/abastecer", 3000, 4);
AreaPosto[i] = 1;
}
else
{
if(AreaPosto[i] == 1)
{
AreaPosto[i] = 0;
} // Postos em LV
if(PlayerToPoint(7.0, i, 2638.9553, 1107.1788, 10.8203)
|| PlayerToPoint(7.0, i, 1595.6233, 2199.6162, 10.8203)
|| PlayerToPoint(7.0, i, 1940.8671, -1773.2283, 13.3906)
|| PlayerToPoint(7.0, i, -2243.8435, -2560.5598, 31.9219)
|| PlayerToPoint(7.0, i, -1328.8868, 2677.6269, 50.0625))
{
GameTextForPlayer(i, "~r~/abastecer", 3000, 4);
AreaPosto[i] = 1;
}
else
{
if(AreaPosto[i] == 1)
{
AreaPosto[i] = 0;
} // Postos em LS/SF
if(PlayerToPoint(7.0, i, 1382.3647, 459.0785, 20.3452)
|| PlayerToPoint(7.0, i, -1675.4781, 413.1594, 7.1797)
|| PlayerToPoint(7.0, i, 655.5922, -565.3943, 16.3359)
|| PlayerToPoint(7.0, i, -1606.3616, -2713.5872, 48.5335))
{
GameTextForPlayer(i, "~r~/abastecer", 3000, 4);
AreaPosto[i] = 1;
}
else
{
if(AreaPosto[i] == 1)
{
AreaPosto[i] = 0;
} // Postos em Acima FC
if(PlayerToPoint(7.0, i, 576.3771, 1662.789, 619.3304)
|| PlayerToPoint(7.0, i, 1004.1403, -937.8801, 42.1797)
|| PlayerToPoint(7.0, i, 2202.1230, 2476.8582, 10.8203)
|| PlayerToPoint(7.0, i, 417.2369, -1912.7708, 1.5641))
{
GameTextForPlayer(i, "~r~/abastecer", 3000, 4);
AreaPosto[i] = 1;
}
else
{
if(AreaPosto[i] == 1)
{
AreaPosto[i] = 0;
}
}
}
}
}
}
}
return 1;
}[/i]
Host vai fechar 01/09/13 e meu server ta crashando