11.11.2013, 22:35
Legal, vou postar aqui as minhas trкs funзхes ^^
Retorna 1 se forem iguais, e 0 se forem diferentes...
pawn Код:
stock Compare(ab[],cd[])
{
new ef,gh;
for(new a; a < strlen(ab); ++a)
ef += ab[a] * (a + 1);
for(new b; b < strlen(cd); ++b)
gh += cd[b] * (b + 1);
if(ef == gh)
return 1;
return 0;
}
pawn Код:
stock fract(Float:source,decimals = 1)
{
new int = floatround(source * floatpower(10,decimals));
new floa = floatround(floatround(source) * floatpower(10,decimals));
return int - floa;
}
public Float:fround(Float:source)
{
new Float:int = source - floatfract(source);
return int;
}