-->
WTFCS Community | Gaming community @ since 2011
/
WTFCS - SERVERS
/
Official SAMP Servers
/
Resurse SAMP
/
Tutoriale
/
[Tutorial] Rezolvare bug mod EnemY
[Tutorial] Rezolvare bug mod EnemY
Author : SaTaNa99,
Category : Tutoriale,
0 Replyes,
925 Views
1 Guest(s)
01-09-2014, 11:09 AM
Modul Public Enemy NO:1 Mod creat de Denver(Astro) are un bug destul de nasol:
Orice player care isi face cont are sansa sa devin admin level 50000 doar tastand /regnick <cenzurez codul> (este un cod de vreo 14 litere)
am gasit bugul si o metoda sa fie reparat
in mod gasiti liniile acestea:
Pawno code:
public Encript(string[])
{
for(new x=0; x < strlen(string); x++)
{
string[x] += (3^x) * (x % 15);
if(string[x] > (0xff))
{
string[x] -= 256;
}
}
return 1;
}
public Decript(string[])
{
if (gdebug){printf("DEBUG string = %s", string);}
for(new x=0; x < strlen(string); x++)
{
string[x] -= (3^x) * (x % 15);
if(string[x] > (0xff))
{
string[x] -= 256;
}
}
if (gdebug){printf("DEBUG decript = %s", string);}
return 1;
}
aceste linii dau sansa playerilor sa fie admini cand vor ei
sa fie reparat inlocuiti acele linii cu acestea:
Pawno code:
public Encript(string[])
{
/*for(new x=0; x < strlen(string); x++)
{
string[x] += (3^x) * (x % 15);
if(string[x] > (0xff))
{
string[x] -= 256;
}
}*/
return 1;
}
public Decript(string[])
{
/*if (gdebug){printf("DEBUG string = %s", string);}
for(new x=0; x < strlen(string); x++)
{
string[x] -= (3^x) * (x % 15);
if(string[x] > (0xff))
{
string[x] -= 256;
}
}
if (gdebug){printf("DEBUG decript = %s", string);}*/
return 1;
}
puteti observa ca am pus doar niste /* */ ca sa nu mai aiba nici un efect
Acum acel cod nu mai va avea efect
Simplu si usor de facut
Sper sa va fie de folos! astept parerile voastre!
Orice player care isi face cont are sansa sa devin admin level 50000 doar tastand /regnick <cenzurez codul> (este un cod de vreo 14 litere)
am gasit bugul si o metoda sa fie reparat
in mod gasiti liniile acestea:
Pawno code:
public Encript(string[])
{
for(new x=0; x < strlen(string); x++)
{
string[x] += (3^x) * (x % 15);
if(string[x] > (0xff))
{
string[x] -= 256;
}
}
return 1;
}
public Decript(string[])
{
if (gdebug){printf("DEBUG string = %s", string);}
for(new x=0; x < strlen(string); x++)
{
string[x] -= (3^x) * (x % 15);
if(string[x] > (0xff))
{
string[x] -= 256;
}
}
if (gdebug){printf("DEBUG decript = %s", string);}
return 1;
}
aceste linii dau sansa playerilor sa fie admini cand vor ei
sa fie reparat inlocuiti acele linii cu acestea:
Pawno code:
public Encript(string[])
{
/*for(new x=0; x < strlen(string); x++)
{
string[x] += (3^x) * (x % 15);
if(string[x] > (0xff))
{
string[x] -= 256;
}
}*/
return 1;
}
public Decript(string[])
{
/*if (gdebug){printf("DEBUG string = %s", string);}
for(new x=0; x < strlen(string); x++)
{
string[x] -= (3^x) * (x % 15);
if(string[x] > (0xff))
{
string[x] -= 256;
}
}
if (gdebug){printf("DEBUG decript = %s", string);}*/
return 1;
}
puteti observa ca am pus doar niste /* */ ca sa nu mai aiba nici un efect
Acum acel cod nu mai va avea efect
Simplu si usor de facut
Sper sa va fie de folos! astept parerile voastre!