04.01.2015, 18:06
its here
and here
Quote:
stock udb_hash(buf[]) { new length=strlen(buf); new s1 = 1; new s2 = 0; new n; for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1; } |
Quote:
GetVehicleVelocity(GetPlayerVehicleID(playerid), svx[playerid], svy[playerid], svz[playerid]); // This Saves Our Velocitys To Our Varibles s1[playerid] = floatsqroot(((svx[playerid]*svx[playerid])+(svy[playerid]*svy[playerid]))+(svz[playerid]*svz[playerid]))*100; // This Is Our Forumula ( I Don't Know How It Works but i found it on internet ) s2[playerid] = floatround(s1[playerid],floatround_round); // Round the output off to a whole number format(s3[playerid],32,"%i", s2[playerid]); // The textdraw string TextDrawSetString(MPH1[playerid], s3[playerid]); // The actual changing of the textdraw |