Advertisement
Guest User

SISTEMA DE PATENTE POR SCORE

a guest
Aug 30th, 2015
2,553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.61 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////////////
  2. ////////////// SISTEMA DE PATENTES POR IZAQUE COSTA (T)akelot///////////////////
  3. ////////////////////////////////30\08\2015//////////////////////////////////////
  4. //////////////////////////198.15.64.3:7789//////////////////////////////////////
  5. //////////////////////////198.15.64.3:7789//////////////////////////////////////
  6. ////////////////////////////////////////////////////////////////////////////////
  7.  
  8.  
  9. #include            < a_samp >
  10. #include            < zcmd   >
  11.  
  12. #define             Patente_list_dialog 4400
  13.  
  14. new
  15.     Text:PatenteDraw[MAX_PLAYERS],
  16.     Text3D:Patente[MAX_PLAYERS],
  17.     PT[MAX_PLAYERS]
  18. ;
  19.  
  20. public OnFilterScriptInit() { return print("- Filterscript Patentes Loaded"); }
  21. public OnFilterScriptExit() { return print("- Filterscript Patentes Off");    }
  22.  
  23. public OnPlayerConnect(playerid) {
  24.  
  25.     //==========================================================================
  26.  
  27.     PatenteDraw[playerid] = TextDrawCreate(490.000000, 130.000000, "loading...");
  28.     TextDrawBackgroundColor(PatenteDraw[playerid], 255);
  29.     TextDrawFont(PatenteDraw[playerid], 3);
  30.     TextDrawLetterSize(PatenteDraw[playerid], 0.559999, 1.700000);
  31.     TextDrawColor(PatenteDraw[playerid], -1);
  32.     TextDrawSetOutline(PatenteDraw[playerid], 1);
  33.     TextDrawSetProportional(PatenteDraw[playerid], 1);
  34.  
  35.     //==========================================================================
  36.  
  37.     SetTimerEx("UpdatePatente", 2000, true, "i", playerid);
  38.     Patente[playerid] = Create3DTextLabel(PT, -1, 30.0, 40.0, 50.0, 40.0, 0, 0);
  39.  
  40.     return 1;
  41. }
  42.  
  43. public OnPlayerDisconnect(playerid) { return Delete3DTextLabel(Patente[playerid]); }
  44.  
  45. public OnPlayerSpawn(playerid) {
  46.  
  47.     new
  48.         String[21],
  49.         Score = GetPlayerScore(playerid)
  50.     ;
  51.  
  52.  
  53.     if(Score <= 100) { String = "Player Novato"; }
  54.  
  55.     else if(Score <= 200) { String = "Player Mediano"; }
  56.  
  57.     else if(Score <= 300) { String = "Player Bom"; }
  58.  
  59.     else if(Score <= 400) { String = "Player Avançado"; }
  60.  
  61.     else if(Score <= 500) { String = "Player Famoso"; }
  62.  
  63.     else if(Score <= 600) { String = "Player Amador"; }
  64.  
  65.     else if(Score <= 700) { String = "Player Profissional"; }
  66.  
  67.     else if(Score <= 800) { String = "Player Viciado"; }
  68.  
  69.     else if(Score >= 1000) { String = "Player Master"; }
  70.  
  71.     Attach3DTextLabelToPlayer(Patente[playerid], playerid, 0.0, 0.0, 0.5);
  72.  
  73.     TextDrawShowForPlayer(playerid, PatenteDraw[playerid]);
  74.  
  75.     return 1;
  76. }
  77.  
  78. command(patentes, playerid, params[]) {
  79.  
  80.     new Formmartando[800];
  81.  
  82.     if (IsPlayerConnected(playerid)) {
  83.  
  84.         format(Formmartando, 800, "%s{FF0000}~~~~~~~~[ {00FFFF}PATENTE LIST {FF0000}]~~~~~~~~", Formmartando);
  85.  
  86.         format(Formmartando, 800, "%s\n\n", Formmartando);
  87.  
  88.         format(Formmartando, 800, "%s1- {00FFFF}Patente: {FFFFFF}Novato\t{00FFFF}=\t{FFFFFF}100 {00FFFF}scores\n", Formmartando);
  89.  
  90.         format(Formmartando, 800, "%s2- {00FFFF}Patente: {FFFFFF}Mediano\t{00FFFF}=\t{FFFFFF}200 {00FFFF}scores\n", Formmartando);
  91.  
  92.         format(Formmartando, 800, "%s3- {00FFFF}Patente: {FFFFFF}Bom\t{00FFFF}=\t{FFFFFF}300 {00FFFF}scores\n", Formmartando);
  93.  
  94.         format(Formmartando, 800, "%s4- {00FFFF}Patente: {FFFFFF}Avançado\t{00FFFF}=\t{FFFFFF}400 {00FFFF}scores\n", Formmartando);
  95.  
  96.         format(Formmartando, 800, "%s5- {00FFFF}Patente: {FFFFFF}Famoso\t{00FFFF}=\t{FFFFFF}500 {00FFFF}scores\n", Formmartando);
  97.  
  98.         format(Formmartando, 800, "%s6- {00FFFF}Patente: {FFFFFF}Amador\t{00FFFF}=\t{FFFFFF}600 {00FFFF}scores\n", Formmartando);
  99.  
  100.         format(Formmartando, 800, "%s7- {00FFFF}Patente: {FFFFFF}Profissional\t{00FFFF}=\t{FFFFFF}700 {00FFFF}scores\n", Formmartando);
  101.  
  102.         format(Formmartando, 800, "%s8- {00FFFF}Patente: {FFFFFF}Viciado\t{00FFFF}=\t{FFFFFF}800 {00FFFF}scores\n", Formmartando);
  103.  
  104.         format(Formmartando, 800, "%s9- {00FFFF}Patente: {FFFFFF}Master\t{00FFFF}=\t{FFFFFF}1000 {00FFFF}scores\n", Formmartando);
  105.  
  106.         ShowPlayerDialog(playerid, Patente_list_dialog, DIALOG_STYLE_LIST, "{FF0000}Patentes", Formmartando, "OK", "");
  107.     }
  108.     return 1;
  109. }
  110.  
  111. forward UpdatePatente(playerid);
  112. public UpdatePatente(playerid) {
  113.  
  114.     new Score = GetPlayerScore(playerid);
  115.  
  116.     if(0 < Score < 100)         TextDrawSetString(PatenteDraw[playerid], "~p~Novato");
  117.    
  118.     else if(100 < Score < 200)  TextDrawSetString(PatenteDraw[playerid], "~p~mediano");
  119.    
  120.     else if(200 < Score < 300)  TextDrawSetString(PatenteDraw[playerid], "~p~bom");
  121.    
  122.     else if(300 < Score < 400)  TextDrawSetString(PatenteDraw[playerid], "~p~Avançado");
  123.    
  124.     else if(400 < Score < 500)  TextDrawSetString(PatenteDraw[playerid], "~p~famoso");
  125.    
  126.     else if(500 < Score < 600)  TextDrawSetString(PatenteDraw[playerid], "~p~amador");
  127.    
  128.     else if(600 < Score < 700)  TextDrawSetString(PatenteDraw[playerid], "~p~Profissional");
  129.    
  130.     else if(700 < Score < 800)  TextDrawSetString(PatenteDraw[playerid], "~p~viciado");
  131.    
  132.     else if(Score > 1000)       TextDrawSetString(PatenteDraw[playerid], "~p~master");
  133.    
  134.     return 1;
  135. }
  136.  
  137. stock PegarNome(playerid) {
  138.  
  139.     new name[MAX_PLAYER_NAME];
  140.     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  141.     return name;
  142. }
  143.  
  144.  
  145. ////////////////////////////////////////////////////////////////////////////////
  146. ////////////// SISTEMA DE PATENTES POR IZAQUE COSTA (T)akelot///////////////////
  147. ////////////////////////////////30\08\2015//////////////////////////////////////
  148. //////////////////////////198.15.64.3:7789//////////////////////////////////////
  149. //////////////////////////198.15.64.3:7789//////////////////////////////////////
  150. ////////////////////////////////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement