30.07.2011, 14:46
I have a strange problem with my script.
After couple hours since last GMX, commands what use y_ini not carried out to the end.
Here's part of my command:
This part is not carried out:
So, that part is not carried out, and it returns me "wrong command", but most of the command is carried out.
When i restart my server, it's works well for couple hours, but after X hours it's becomes fucked up.
Until a few days there was no problems. I haven't made any changes with this part of script.
Function SacuvajOrg uses y_ini..
After couple hours since last GMX, commands what use y_ini not carried out to the end.
Here's part of my command:
pawn Code:
else if(!strcmp(akcija, "lider", true))
{
if(PI[playerid][Admin] >= HEAD || IsPlayerAdmin(playerid))
{
if(parametar == 1)
{
if(strcmp(PDInfo[1][Lider], "Niko", false) && strcmp(PDInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 2)
{
if(strcmp(FBIInfo[1][Lider], "Niko", false) && strcmp(FBIInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 3)
{
if(strcmp(SWATInfo[1][Lider], "Niko", false) && strcmp(SWATInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 4)
{
if(strcmp(MDInfo[1][Lider], "Niko", false) && strcmp(MDInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 5)
{
if(strcmp(SCFInfo[1][Lider], "Niko", false) && strcmp(SCFInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 6)
{
if(strcmp(WTMInfo[1][Lider], "Niko", false) && strcmp(WTMInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 7)
{
if(strcmp(MayorInfo[1][Lider], "Niko", false) && strcmp(MayorInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 8)
{
if(strcmp(HAInfo[1][Lider], "Niko", false) && strcmp(HAInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 9)
{
if(strcmp(RNLInfo[1][Lider], "Niko", false) && strcmp(RNLInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 10)
{
if(strcmp(TCInfo[1][Lider], "Niko", false) && strcmp(TCInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 11)
{
if(strcmp(GSFInfo[1][Lider], "Niko", false) && strcmp(GSFInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 12)
{
if(strcmp(SSLInfo[1][Lider], "Niko", false) && strcmp(SSLInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 13)
{
if(strcmp(NGRInfo[1][Lider], "Niko", false) && strcmp(NGRInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
else if(parametar == 14)
{
if(strcmp(THFInfo[1][Lider], "Niko", false) && strcmp(THFInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
}
if(!IsPlayerConnected(id)) return SCM(playerid, GRAD2, "(greska) Taj igrac je offline!");
new hime[2][MAX_PLAYER_NAME];
ImeIgraca(id, hime[1]);
RPIme(playerid, hIme[0]);
RPIme(id, hIme[1]);
UcitajOrg(parametar, 1);
if(parametar < 1 || parametar > 14) return SCM(playerid, GRAD2, "(greska) Pogresan ID!");
format(CmdString, sizeof CmdString, "Postavili ste {FFFFFF}%s {33CCFF}za lidera organizacije/bande {FFFFFF}%s.", hIme[1], ImeOrganizacije(parametar));
SCM(playerid, SVETLOPLAVA, CmdString);
format(CmdString, sizeof CmdString, " * Postavljeni ste za lidera organizacije/bande {FFFFFF}%s {33CCFF}| Head admin: {FFFFFF}%s.", ImeOrganizacije(parametar), hIme[0]);
SCM(id, SVETLOPLAVA, CmdString);
if(parametar == 1) { h_SetPlayerSkin(id, PD_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 2) { h_SetPlayerSkin(id, FBI_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 3) { h_SetPlayerSkin(id, SWAT_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 4) { h_SetPlayerSkin(id, MD_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 5) { h_SetPlayerSkin(id, SCF_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 6) { h_SetPlayerSkin(id, WTM_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 7) { h_SetPlayerSkin(id, MAYOR_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 8) { h_SetPlayerSkin(id, HA_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 9) { h_SetPlayerSkin(id, RNL_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 10) { h_SetPlayerSkin(id, TC_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 11) { h_SetPlayerSkin(id, GSF_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 12) { h_SetPlayerSkin(id, SSL_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 13) { h_SetPlayerSkin(id, NGR_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
else if(parametar == 14) { h_SetPlayerSkin(id, THF_LIDER); PI[id][Skin] = GetPlayerSkin(playerid); }
PI[id][Lider] = parametar;
PI[id][Clan] = parametar;
PI[id][Rank] = 6;
new kkk[MAX_PLAYER_NAME], mu[200];
ImeIgraca(id, kkk);
format(mu, 200, "UPDATE `Igraci` SET `Lider` = '%d', `Clan` = '%d', `Rank` = '6', `Skin` = '%d' WHERE `Ime` = '%s'", parametar, parametar, PI[id][Skin], kkk);
mysql_query(mu);
if(parametar == 1)
{
if(strcmp(PDInfo[1][Lider], "Niko", false) && strcmp(PDInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(PDInfo[i][Lider], "Niko", false)) { strmid(PDInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(1, 1); break; }
}
}
else if(parametar == 2)
{
if(strcmp(FBIInfo[1][Lider], "Niko", false) && strcmp(FBIInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(FBIInfo[i][Lider], "Niko", false)) { strmid(FBIInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(2, 1); break; }
}
}
else if(parametar == 3)
{
if(strcmp(SWATInfo[1][Lider], "Niko", false) && strcmp(SWATInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(SWATInfo[i][Lider], "Niko", false)) { strmid(SWATInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(3, 1); break; }
}
}
else if(parametar == 4)
{
if(strcmp(MDInfo[1][Lider], "Niko", false) && strcmp(MDInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(MDInfo[i][Lider], "Niko", false)) { strmid(MDInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(4, 1); break; }
}
}
else if(parametar == 5)
{
if(strcmp(SCFInfo[1][Lider], "Niko", false) && strcmp(SCFInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(SCFInfo[i][Lider], "Niko", false)) { strmid(SCFInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(5, 1); break; }
}
}
else if(parametar == 6)
{
if(strcmp(WTMInfo[1][Lider], "Niko", false) && strcmp(WTMInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(WTMInfo[i][Lider], "Niko", false)) { strmid(WTMInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(6, 1); break; }
}
}
else if(parametar == 7)
{
if(strcmp(MayorInfo[1][Lider], "Niko", false) && strcmp(MayorInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(MayorInfo[i][Lider], "Niko", false)) { strmid(MayorInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(7, 1); break; }
}
}
else if(parametar == 8)
{
if(strcmp(HAInfo[1][Lider], "Niko", false) && strcmp(HAInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(HAInfo[i][Lider], "Niko", false)) { strmid(HAInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(8, 1); break; }
}
}
else if(parametar == 9)
{
if(strcmp(RNLInfo[1][Lider], "Niko", false) && strcmp(RNLInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(RNLInfo[i][Lider], "Niko", false)) { strmid(RNLInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(9, 1); break; }
}
}
else if(parametar == 10)
{
if(strcmp(TCInfo[1][Lider], "Niko", false) && strcmp(TCInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(TCInfo[i][Lider], "Niko", false)) { strmid(TCInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(10, 1); break; }
}
}
else if(parametar == 11)
{
if(strcmp(GSFInfo[1][Lider], "Niko", false) && strcmp(GSFInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(GSFInfo[i][Lider], "Niko", false)) { strmid(GSFInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(11, 1); break; }
}
}
else if(parametar == 12)
{
if(strcmp(SSLInfo[1][Lider], "Niko", false) && strcmp(SSLInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(SSLInfo[i][Lider], "Niko", false)) { strmid(SSLInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(12, 1); break; }
}
}
else if(parametar == 13)
{
if(strcmp(NGRInfo[1][Lider], "Niko", false) && strcmp(NGRInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(NGRInfo[i][Lider], "Niko", false)) { strmid(NGRInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(13, 1); break; }
}
}
else if(parametar == 14)
{
if(strcmp(THFInfo[1][Lider], "Niko", false) && strcmp(THFInfo[2][Lider], "Niko", false)) return SCM(playerid, SVETLOCRVENA, "(greska) Oba lider mesta su zauzeta!");
for(new i = 1; i < 3; i++)
{
if(!strcmp(THFInfo[i][Lider], "Niko", false)) { strmid(THFInfo[i][Lider], hime[1], 0, strlen(hime[1]), 255); SacuvajOrg(14, 1); break; }
}
}
new ip[16], logstring[256];
GetPlayerIp(playerid, ip, sizeof ip);
format(logstring, sizeof logstring, "|LIDER| Igrac: %s | Postavio: %s | Org/banda: %s | IP: %s", hIme[1], hIme[0], ImeOrganizacije(parametar), ip);
UpisiLog(FAJL_MAKELOG, logstring);
}
else return SCM(playerid, GRAD2, "(greska) Niste autorizovani da koristite ovu komandu!");
}
This part is not carried out:
pawn Code:
new ip[16], logstring[256];
GetPlayerIp(playerid, ip, sizeof ip);
format(logstring, sizeof logstring, "|LIDER| Igrac: %s | Postavio: %s | Org/banda: %s | IP: %s", hIme[1], hIme[0], ImeOrganizacije(parametar), ip);
UpisiLog(FAJL_MAKELOG, logstring);
When i restart my server, it's works well for couple hours, but after X hours it's becomes fucked up.
Until a few days there was no problems. I haven't made any changes with this part of script.
Function SacuvajOrg uses y_ini..