Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
Wklejka 77pxpkpgndog dodana przez Droso, 31.12.2012 23:35
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61.
/* Wyswietlanie z numerami oraz nickiem gracza i XP*/ public Top15(id){ new Data[768], iLen=0, iMax=sizeof(Data) - 1; iLen += formatex(Data[iLen],iMax-iLen,"<body bgcolor=^"black^"><font color=^"green^"><html><head><br/><center>| TOP 15 |</center><br/></head><br/>"); nvault_util_read_example(); for(new i=1;i<16;i++){ iLen += formatex(Data[iLen],iMax-iLen,"%d. Gracz: <b>%s</b> Exp: <b>%d</b><br/>", i, najlepsi_nick[i], najlepsi_exp[i]); } iLen += formatex(Data[iLen],iMax-iLen,"</font></body></html>"); show_motd(id, Data, "Informacje"); return PLUGIN_CONTINUE; } /* Całe numerkowanie */ public nvault_util_read_example() { new iPos , szKey[ 64 ] , szVal[ 256 ] , iTimeStamp; new iVault = nvault_util_open( "ExpMod" ); new iCount = nvault_util_count( iVault ); for ( new iCurrent = 1 ; iCurrent <= iCount ; iCurrent++ ) { iPos = nvault_util_read( iVault , iPos , szKey , charsmax( szKey ) , szVal , charsmax( szVal ) , iTimeStamp ); //server_print( "[%d of %d] Key=%s Val=%s Timestamp=%d" , iCurrent , iCount , szKey , szVal , iTimeStamp ); replace_all(szKey, 63, "-exp", ""); /* usuniecie frazy -exp z VaultKey*/ replace_all(szVal, 255, "#", " ") new playerxp[32]; parse(szVal, playerxp, 31) new szKeyExp = str_to_num(playerxp); CheckNumberTop15(szKeyExp, szKey); } nvault_util_close( iVault ); } /* by me xD*/ stock CheckNumberTop15(number, const szText[]){ for(new i=1; i<16; i++) { if(number >= najlepsi_exp[i]) { najlepsi_exp[i] = number; formatex(najlepsi_nick[i], 31, "%s", szText); break; } } }
Dodanych wklejek: 12215
Powered By (Pav32) Pastebin © 2011