Want more features on Pastebin? Sign Up, it's FREE!
Guest

RankSystem

By: a guest on Jan 23rd, 2012  |  syntax: PAWN  |  size: 4.09 KB  |  views: 443  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // Script made by lordturhan
  2. // DO not re-release or sell without my permissiom
  3.  
  4. /*
  5.  
  6. Rank System Made By LordTurhan
  7.  
  8. Credits:
  9. LordTurhan
  10. Silentfood
  11. Cameltoe
  12. Sa-Mp Forums
  13.  
  14.  
  15. Special Thanks for answering my questions :D
  16.  
  17. */
  18.  
  19. #define FILTERSCRIPT
  20.  
  21. #include <a_samp>
  22. #include <zcmd>
  23. #include <sscanf2>
  24.  
  25. #define GREEN 0x33AA33AA
  26. #define WHITE 0xFFFFFFAA
  27.  
  28. #if defined FILTERSCRIPT
  29.  
  30. public OnFilterScriptInit()
  31. {
  32.         print("\n--------------------------------------");
  33.         print("Rank System By LordTurhan");
  34.         print("--------------------------------------\n");
  35.         return 1;
  36. }
  37.  
  38.  
  39. #endif
  40.  
  41.  
  42. public OnPlayerSpawn(playerid)
  43. {
  44.     if(GetPlayerScore(playerid) > 0 && GetPlayerScore(playerid) < 10)
  45.     {
  46.     new Text3D:label = Create3DTextLabel("Private",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
  47.     Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.4);
  48.     }
  49.     else if(GetPlayerScore(playerid) > 10 && GetPlayerScore(playerid) < 50)
  50.     {
  51.     new Text3D:label1 = Create3DTextLabel("Private First Class",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
  52.     Attach3DTextLabelToPlayer(label1, playerid, 0.0, 0.0, 0.4);
  53.     }
  54.     else if(GetPlayerScore(playerid) > 50 && GetPlayerScore(playerid) < 100)
  55.     {
  56.     new Text3D:label2 = Create3DTextLabel("Corporal",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
  57.     Attach3DTextLabelToPlayer(label2, playerid, 0.0, 0.0, 0.4);
  58.     }
  59.     else if(GetPlayerScore(playerid) > 100 && GetPlayerScore(playerid) < 200)
  60.     {
  61.     new Text3D:label3 = Create3DTextLabel("Sergeant",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
  62.     Attach3DTextLabelToPlayer(label3, playerid, 0.0, 0.0, 0.4);
  63.     }
  64.     else if(GetPlayerScore(playerid) > 200 && GetPlayerScore(playerid) < 300)
  65.     {
  66.     new Text3D:label4 = Create3DTextLabel("Staff Sergeant",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
  67.     Attach3DTextLabelToPlayer(label4, playerid, 0.0, 0.0, 0.4);
  68.     }
  69.     else if(GetPlayerScore(playerid) > 300 && GetPlayerScore(playerid) < 500)
  70.     {
  71.     new Text3D:label5 = Create3DTextLabel("Sergeant First Class",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
  72.     Attach3DTextLabelToPlayer(label5, playerid, 0.0, 0.0, 0.4);
  73.     }
  74.     else if(GetPlayerScore(playerid) > 500 && GetPlayerScore(playerid) < 600)
  75.     {
  76.     new Text3D:label6 = Create3DTextLabel("Master Sergeant",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
  77.     Attach3DTextLabelToPlayer(label6, playerid, 0.0, 0.0, 0.4);
  78.     }
  79.     else if(GetPlayerScore(playerid) >= 600)
  80.     {
  81.     new Text3D:label7 = Create3DTextLabel("Commander",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
  82.     Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
  83.     }
  84.     return 1;
  85. }
  86.  
  87.  
  88.  
  89.  
  90. CMD:rankinfo(playerid,params[])
  91. {
  92.  SendClientMessage(playerid,GREEN,"Private:0 Score");
  93.  SendClientMessage(playerid,GREEN,"Private First Class:10 Score");
  94.  SendClientMessage(playerid,GREEN,"Corporal:50 Score");
  95.  SendClientMessage(playerid,GREEN,"Sergeant:100 Score");
  96.  SendClientMessage(playerid,GREEN,"Staff Sergeant:200 Score");
  97.  SendClientMessage(playerid,GREEN,"Sergeant First Class:300 Score");
  98.  SendClientMessage(playerid,GREEN,"Master Sergeant:500 Score");
  99.  SendClientMessage(playerid,GREEN,"Commander:600 Score");
  100.  return 1;
  101. }
  102. CMD:rank(playerid,params[])
  103. {
  104.  if(GetPlayerScore(playerid) < 10)
  105.  {
  106.     SendClientMessage(playerid,GREEN,"Your rank is Private!");
  107.  }
  108.  else if(GetPlayerScore(playerid) < 50)
  109.  {
  110.     SendClientMessage(playerid,GREEN,"Your rank is Private First Class!");
  111.  }
  112.  else if(GetPlayerScore(playerid) < 100)
  113.  {
  114.     SendClientMessage(playerid,GREEN,"Your rank is Corporal!");
  115.  }
  116.  else if(GetPlayerScore(playerid) < 200)
  117.  {
  118.     SendClientMessage(playerid,GREEN,"Your rank is Sergeant!");
  119.  }
  120.  else if(GetPlayerScore(playerid) < 300)
  121.  {
  122.     SendClientMessage(playerid,GREEN,"Your rank is Staff Sergeant!");
  123.  }
  124.  else if(GetPlayerScore(playerid) < 500)
  125.  {
  126.     SendClientMessage(playerid, GREEN,"Your rank is Sergeant First Class!");
  127.  }
  128.  else if(GetPlayerScore(playerid) < 600)
  129.  {
  130.     SendClientMessage(playerid, GREEN,"Your rank is Master Sergeant!");
  131.  }
  132.  else if(GetPlayerScore(playerid) >= 600)
  133.  {
  134.     SendClientMessage(playerid,GREEN,"Your rank is Commander!");
  135.  }
  136.  return 1;
  137. }
clone this paste RAW Paste Data