Advertisement
Guest User

Untitled

a guest
May 26th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.91 KB | None | 0 0
  1. function CallBestPlayerActive() {
  2. new string[128];
  3. mysql_format(SQL,string, sizeof(string),"SELECT name,ConnectedTime FROM users ORDER BY ConnectedTime DESC LIMIT 1");
  4. mysql_tquery(SQL,string,"BestPlayerActive","");
  5. return 1;
  6. }
  7.  
  8. function BestPlayerActive() {
  9. new name[32]; cache_get_field_content(0,"name",name);
  10. new string[256];
  11. new id = GetPlayerID(name);
  12. //36949 format(string, sizeof(string), "%s are ce le mai multe ore jucate de pe server! Acesta detine %0.2f ore jucate!", name, PlayerInfo[id][pConnectTime]);
  13. SCMTA(COLOR_LIGHTRED, string);
  14.  
  15. new query[128];
  16.  
  17. format(query, sizeof(query),"UPDATE users SET `SefuActivilor`='0' WHERE `SefuActivilor`='1'");
  18. mysql_query(SQL,query);
  19.  
  20. format(query,sizeof(query),"UPDATE users SET `SefuActivilor`='1' WHERE `ID`='%d'",PlayerInfo[id][pSQLID]);
  21. mysql_query(SQL, query);
  22.  
  23. if(IsPlayerConnected(id)) {
  24. SCM(id, COLOR_YELLOW, "Deoarece esti cel mai activ jucator de pe server ti-a fost acordat gradul de NO LIFER.");
  25. SCM(id, COLOR_YELLOW, "Mentine suma de ore jucate cat mai mare, altfel vei pierde gradul.");
  26. PlayerInfo[id][pSefuActivilor] = 1;
  27. Update(id, pSefuActivilorx);
  28. PlayerInfo[id][pObtained1Pus] = 0;
  29. PlayerInfo[id][pObtained2Pus] = 0;
  30. PlayerInfo[id][pObtained3Pus] = 0;
  31. PlayerInfo[id][pObtained4Pus] = 1;
  32. Update(id, pObtained1Pusx);
  33. Update(id, pObtained2Pusx);
  34. Update(id, pObtained3Pusx);
  35. Update(id, pObtained4Pusx);
  36. if(IsValidDynamic3DTextLabel(YTScris[id])) DestroyDynamic3DTextLabel(YTScris[id]);
  37. if(IsValidDynamic3DTextLabel(VipScris[id])) DestroyDynamic3DTextLabel(VipScris[id]);
  38. if(IsValidDynamic3DTextLabel(BaniScris[id])) DestroyDynamic3DTextLabel(BaniScris[id]);
  39. if(IsValidDynamic3DTextLabel(ActivScris[id])) DestroyDynamic3DTextLabel(ActivScris[id]);
  40. AttachVipTags(id);
  41. }
  42. return 1;
  43. }
  44.  
  45. function CallBestPlayerMoney() {
  46. new string[128];
  47. mysql_format(SQL,string, sizeof(string),"SELECT name,Bank FROM users ORDER BY Bank DESC LIMIT 1");
  48. mysql_tquery(SQL,string,"BestPlayerMoney","");
  49. return 1;
  50. }
  51.  
  52. function BestPlayerMoney() {
  53. new name[32]; cache_get_field_content(0,"name",name);
  54. new string[256];
  55. new id = GetPlayerID(name);
  56. //36993 format(string, sizeof(string), "%s este cel mai bogat jucator de pe server! Acesta detine $%s in banca!", name, FormatNumber(PlayerInfo[id][pAccount]));
  57. SCMTA(COLOR_LIGHTRED, string);
  58.  
  59. new query[128];
  60.  
  61. format(query, sizeof(query),"UPDATE users SET `SefuBaniilor`='0' WHERE `SefuBaniilor`='1'");
  62. mysql_query(SQL,query);
  63.  
  64. format(query,sizeof(query),"UPDATE users SET `SefuBaniilor`='1' WHERE `ID`='%d'",PlayerInfo[id][pSQLID]);
  65. mysql_query(SQL, query);
  66.  
  67. if(IsPlayerConnected(id)) {
  68. SCM(id, COLOR_YELLOW, "Deoarece esti cel mai bogat jucator de pe server ti-a fost acordat gradul de SEFU LA BANI.");
  69. SCM(id, COLOR_YELLOW, "Mentine suma de bani in banca cat mai mare, altfel vei pierde gradul.");
  70. PlayerInfo[id][pSefuBaniilor] = 1;
  71. Update(id, pSefuBaniilorx);
  72. PlayerInfo[id][pObtained1Pus] = 0;
  73. PlayerInfo[id][pObtained2Pus] = 0;
  74. PlayerInfo[id][pObtained3Pus] = 1;
  75. PlayerInfo[id][pObtained4Pus] = 0;
  76. Update(id, pObtained1Pusx);
  77. Update(id, pObtained2Pusx);
  78. Update(id, pObtained3Pusx);
  79. Update(id, pObtained4Pusx);
  80. if(IsValidDynamic3DTextLabel(YTScris[id])) DestroyDynamic3DTextLabel(YTScris[id]);
  81. if(IsValidDynamic3DTextLabel(VipScris[id])) DestroyDynamic3DTextLabel(VipScris[id]);
  82. if(IsValidDynamic3DTextLabel(BaniScris[id])) DestroyDynamic3DTextLabel(BaniScris[id]);
  83. if(IsValidDynamic3DTextLabel(ActivScris[id])) DestroyDynamic3DTextLabel(ActivScris[id]);
  84. AttachVipTags(id);
  85. }
  86. return 1;
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement