Advertisement
Guest User

PATENT SYSTEM

a guest
Sep 22nd, 2015
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.38 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. ///////////////////////////////////////////////////////////////////A/////////////
  7. #include            < a_samp >
  8. #include            < zcmd   >
  9.  
  10. #define             Patente_list_dialog 4400
  11.  
  12. new PlayerText:PatenteDraw[MAX_PLAYERS], Text3D:Patente[MAX_PLAYERS],PT[MAX_PLAYERS];
  13.  
  14. public OnFilterScriptInit() { return print("- Filterscript Patentes Loaded"); }
  15. public OnFilterScriptExit() { return print("- Filterscript Patentes Off");    }
  16.  
  17. public OnPlayerConnect(playerid) {
  18.  
  19.     //==========================================================================
  20.  
  21.     PatenteDraw[playerid] = CreatePlayerTextDraw(playerid,490.000000, 130.000000, "loading...");
  22.     PlayerTextDrawBackgroundColor(playerid,PatenteDraw[playerid], 255);
  23.     PlayerTextDrawFont(playerid,PatenteDraw[playerid], 3);
  24.     PlayerTextDrawLetterSize(playerid,PatenteDraw[playerid], 0.559999, 1.700000);
  25.     PlayerTextDrawColor(playerid,PatenteDraw[playerid], -1);
  26.     PlayerTextDrawSetOutline(playerid,PatenteDraw[playerid], 1);
  27.     PlayerTextDrawSetProportional(playerid,PatenteDraw[playerid], 1);
  28.  
  29.     //==========================================================================
  30.  
  31.     SetTimerEx("UpdatePatente", 2000, true, "i", playerid);
  32.     Patente[playerid] = Create3DTextLabel(PT, -1, 30.0, 40.0, 50.0, 40.0, 0, 0);
  33.  
  34.     return 1;
  35. }
  36.  
  37. public OnPlayerDisconnect(playerid) { return Delete3DTextLabel(Patente[playerid]); }
  38.  
  39. public OnPlayerSpawn(playerid) {
  40.  
  41.     new
  42.         String[21],
  43.         Score = GetPlayerScore(playerid)
  44.     ;
  45.  
  46.     if(Score <= 100)            { String = "Player beginner";     }
  47.     else if(Score <= 200)       { String = "Player median";       }
  48.     else if(Score <= 300)       { String = "Player good";         }
  49.     else if(Score <= 400)       { String = "Player advanced";     }
  50.     else if(Score <= 500)       { String = "Player famous";       }
  51.     else if(Score <= 600)       { String = "Player amateur";      }
  52.     else if(Score <= 700)       { String = "Player professional"; }
  53.     else if(Score <= 800)       { String = "Player addict";       }
  54.     else if(Score >= 1000)      { String = "Player Master";       }
  55.  
  56.     Attach3DTextLabelToPlayer(Patente[playerid], playerid, 0.0, 0.0, 0.5);
  57.     PlayerTextDrawShowForPlayer(playerid, PlayerText:PatenteDraw[playerid]);
  58.     return 1;
  59. }
  60.  
  61. command(patentes, playerid, params[]) {
  62.  
  63.     new Formmartando[800];
  64.  
  65.     if (IsPlayerConnected(playerid)) {
  66.  
  67.         format(Formmartando, 800, "%s{FF0000}~~~~~~~~[ {00FFFF}PATENTE LIST {FF0000}]~~~~~~~~", Formmartando);
  68.         format(Formmartando, 800, "%s\n\n", Formmartando);
  69.         format(Formmartando, 800, "%s1- {00FFFF}Patente: {FFFFFF}beginner\t{00FFFF}=\t{FFFFFF}100 {00FFFF}scores\n", Formmartando);
  70.         format(Formmartando, 800, "%s2- {00FFFF}Patente: {FFFFFF}median\t{00FFFF}=\t{FFFFFF}200 {00FFFF}scores\n", Formmartando);
  71.         format(Formmartando, 800, "%s3- {00FFFF}Patente: {FFFFFF}good\t{00FFFF}=\t{FFFFFF}300 {00FFFF}scores\n", Formmartando);
  72.         format(Formmartando, 800, "%s4- {00FFFF}Patente: {FFFFFF}advanced\t{00FFFF}=\t{FFFFFF}400 {00FFFF}scores\n", Formmartando);
  73.         format(Formmartando, 800, "%s5- {00FFFF}Patente: {FFFFFF}famous\t{00FFFF}=\t{FFFFFF}500 {00FFFF}scores\n", Formmartando);
  74.         format(Formmartando, 800, "%s6- {00FFFF}Patente: {FFFFFF}amateur\t{00FFFF}=\t{FFFFFF}600 {00FFFF}scores\n", Formmartando);
  75.         format(Formmartando, 800, "%s7- {00FFFF}Patente: {FFFFFF}professional\t{00FFFF}=\t{FFFFFF}700 {00FFFF}scores\n", Formmartando);
  76.         format(Formmartando, 800, "%s8- {00FFFF}Patente: {FFFFFF}addict\t{00FFFF}=\t{FFFFFF}800 {00FFFF}scores\n", Formmartando);
  77.         format(Formmartando, 800, "%s9- {00FFFF}Patente: {FFFFFF}Master\t{00FFFF}=\t{FFFFFF}1000 {00FFFF}scores\n", Formmartando);
  78.  
  79.         ShowPlayerDialog(playerid, Patente_list_dialog, DIALOG_STYLE_LIST, "{FF0000}Patentes", Formmartando, "OK", "");
  80.     }
  81.     return 1;
  82. }
  83.  
  84. forward UpdatePatente(playerid); public UpdatePatente(playerid) {
  85.  
  86.     new Score = GetPlayerScore(playerid);
  87.  
  88.     if(0 < Score < 100)         PlayerTextDrawSetString(playerid, PatenteDraw[playerid], "~p~beginner");
  89.     else if(100 < Score < 200)  PlayerTextDrawSetString(playerid, PatenteDraw[playerid], "~p~median");
  90.     else if(200 < Score < 300)  PlayerTextDrawSetString(playerid, PatenteDraw[playerid], "~p~good");
  91.     else if(300 < Score < 400)  PlayerTextDrawSetString(playerid, PatenteDraw[playerid], "~p~advanced");
  92.     else if(400 < Score < 500)  PlayerTextDrawSetString(playerid, PatenteDraw[playerid], "~p~famous");
  93.     else if(500 < Score < 600)  PlayerTextDrawSetString(playerid, PatenteDraw[playerid], "~p~amateur");
  94.     else if(600 < Score < 700)  PlayerTextDrawSetString(playerid, PatenteDraw[playerid], "~p~professional");
  95.     else if(700 < Score < 800)  PlayerTextDrawSetString(playerid, PatenteDraw[playerid], "~p~addict");
  96.     else if(Score > 1000)       PlayerTextDrawSetString(playerid, PatenteDraw[playerid], "~p~master");
  97.     return 1;
  98. }
  99.  
  100. stock PegarNome(playerid) {
  101.  
  102.     new name[MAX_PLAYER_NAME];
  103.     GetPlayerName(playerid, name, MAX_PLAYER_NAME);
  104.     return name;
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement