OtaconEvil

[FS] Fácil, nuevo 'tag name' + health/armour By OTACON

Jan 15th, 2014
1,111
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.     * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  3.     *
  4.     * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
  5.     * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
  6.     *
  7.     * Codigo Creado Por OTACON
  8.     *
  9.     * CREDITOS:
  10.     *     OTACON: Realizacion y Idea de creacion del code.
  11.     *     TÙ: Modificacion libremente respetando lo mencionado ;).
  12.     *
  13.     *    NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  14.     *
  15.     *                Prohibido TOTALMENTE el Robo de Créditos o la
  16.     *                  Publicación de este FILTERSCRIPT sin Mi Permiso.
  17. */
  18. /*
  19.     * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  20.     *
  21.     * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
  22.     * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
  23.     *
  24.     * Code Created By OTACON
  25.     *
  26.     * CREDITS:
  27.     *     OTACON: Idea Making and code creation.
  28.     *     YOUR: Modification freely respecting the above ;).
  29.     *
  30.     *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  31.     *
  32.     *                        FULLY spaces Theft Credit or
  33.     *                 Publication of this FILTERSCRIPT without my permission.
  34. */
  35. #include <a_samp>
  36. #include <streamer> //http://forum.sa-mp.com/showthread.php?t=102865
  37. // sample image: ---> http://imagizer.imageshack.us/v2/800x600q90/198/ig7t.png
  38.  
  39. #define NAME_SERVER    "[City Troll]"
  40. #define COLOR_NICK     "{ECE700}"
  41. #define COLOR_ID       "{BB00FF}"
  42. #define COLOR_SERVER   "{FF0000}"
  43. #define HEALTH_LLENA "{FF0000}" //rojo claro
  44. #define HEALTH_VACIA "{AD0000}" //rojo oscuro
  45. #define ARMOUR_LLENA "{FFFFFF}" //blanco
  46. #define ARMOUR_VACIA "{8F8B91}" //gris oscuro
  47. #define DISTANCE_BARRA 10.0
  48. new Text3D:Barra3D[MAX_PLAYERS];
  49.  
  50. public OnFilterScriptInit(){
  51.     ShowNameTags(false);
  52.     return true;
  53. }
  54. public OnPlayerSpawn(playerid){
  55.     if(!IsPlayerConnected(playerid)) return true;
  56.     if(IsPlayerAdmin(playerid)) return true;
  57.     if(IsPlayerNPC(playerid)) return true;
  58.     DestroyDynamic3DTextLabel(Barra3D[playerid]);
  59.     Barra3D[playerid]=CreateDynamic3DTextLabel("",-1,0.0, 0.0, 0.35,DISTANCE_BARRA,playerid);
  60.     return true;
  61. }
  62. public OnPlayerDisconnect(playerid, reason){
  63.     DestroyDynamic3DTextLabel(Barra3D[playerid]);
  64.     return true;
  65. }
  66. public OnPlayerDeath(playerid, killerid, reason){
  67.     DestroyDynamic3DTextLabel(Barra3D[playerid]);
  68.     return true;
  69. }
  70. public OnPlayerUpdate(playerid){
  71.     if(!IsPlayerConnected(playerid)) return true;
  72.     if(IsPlayerAdmin(playerid)) return true;
  73.     if(IsPlayerNPC(playerid)) return true;
  74.     new data[130],barra[2][50],Float:health,Float:armour,name[24];
  75.     GetPlayerHealth(playerid,health);
  76.     GetPlayerArmour(playerid,armour);
  77.     GetPlayerName(playerid,name,sizeof(name));
  78.     if(health == 100) barra[0] = ""HEALTH_LLENA"IIIIIIIIIIIIIIIIIIII";
  79.     else if(health >= 90) barra[0] = ""HEALTH_LLENA"IIIIIIIIIIIIIIIIII"HEALTH_VACIA"II";
  80.     else if(health >= 80) barra[0] = ""HEALTH_LLENA"IIIIIIIIIIIIIIII"HEALTH_VACIA"IIII";
  81.     else if(health >= 70) barra[0] = ""HEALTH_LLENA"IIIIIIIIIIIIII"HEALTH_VACIA"IIIIII";
  82.     else if(health >= 60) barra[0] = ""HEALTH_LLENA"IIIIIIIIIIII"HEALTH_VACIA"IIIIIIII";
  83.     else if(health >= 50) barra[0] = ""HEALTH_LLENA"IIIIIIIIII"HEALTH_VACIA"IIIIIIIIII";
  84.     else if(health >= 40) barra[0] = ""HEALTH_LLENA"IIIIIIII"HEALTH_VACIA"IIIIIIIIIIII";
  85.     else if(health >= 30) barra[0] = ""HEALTH_LLENA"IIIIII"HEALTH_VACIA"IIIIIIIIIIIIII";
  86.     else if(health >= 25) barra[0] = ""HEALTH_LLENA"IIII"HEALTH_VACIA"IIIIIIIIIIIIIIII";
  87.     else if(health < 25) barra[0] = ""HEALTH_VACIA"IIIIIIIIIIIIIIIIIIII";
  88.     if(armour == 100) barra[1] = ""ARMOUR_LLENA"IIIIIIIIIIIIIIIIIIII";
  89.     else if(armour >= 90) barra[1] = ""ARMOUR_LLENA"IIIIIIIIIIIIIIIIII"ARMOUR_VACIA"II";
  90.     else if(armour >= 80) barra[1] = ""ARMOUR_LLENA"IIIIIIIIIIIIIIII"ARMOUR_VACIA"IIII";
  91.     else if(armour >= 70) barra[1] = ""ARMOUR_LLENA"IIIIIIIIIIIIII"ARMOUR_VACIA"IIIIII";
  92.     else if(armour >= 60) barra[1] = ""ARMOUR_LLENA"IIIIIIIIIIII"ARMOUR_VACIA"IIIIIIII";
  93.     else if(armour >= 50) barra[1] = ""ARMOUR_LLENA"IIIIIIIIII"ARMOUR_VACIA"IIIIIIIIII";
  94.     else if(armour >= 40) barra[1] = ""ARMOUR_LLENA"IIIIIIII"ARMOUR_VACIA"IIIIIIIIIIII";
  95.     else if(armour >= 30) barra[1] = ""ARMOUR_LLENA"IIIIII"ARMOUR_VACIA"IIIIIIIIIIIIII";
  96.     else if(armour >= 25) barra[1] = ""ARMOUR_LLENA"IIII"ARMOUR_VACIA"IIIIIIIIIIIIIIII";
  97.     else if(armour < 25) barra[1] = ""ARMOUR_LLENA"IIIIIIIIIIIIIIIIIIII";
  98.     format(data,sizeof(data),""COLOR_SERVER""NAME_SERVER"\n"COLOR_NICK"%s"COLOR_ID"[%d]\n%s\n%s",name,playerid,barra[1],barra[0]);
  99.     UpdateDynamic3DTextLabelText(Barra3D[playerid],-1,data);
  100.     return true;
  101. }
  102. /*
  103.     * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  104.     *
  105.     * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
  106.     * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
  107.     *
  108.     * Codigo Creado Por OTACON
  109.     *
  110.     * CREDITOS:
  111.     *     OTACON: Realizacion y Idea de creacion del code.
  112.     *     TÙ: Modificacion libremente respetando lo mencionado ;).
  113.     *
  114.     *    NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  115.     *
  116.     *                Prohibido TOTALMENTE el Robo de Créditos o la
  117.     *                  Publicación de este FILTERSCRIPT sin Mi Permiso.
  118. */
  119. /*
  120.     * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  121.     *
  122.     * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
  123.     * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
  124.     *
  125.     * Code Created By OTACON
  126.     *
  127.     * CREDITS:
  128.     *     OTACON: Idea Making and code creation.
  129.     *     YOUR: Modification freely respecting the above ;).
  130.     *
  131.     *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  132.     *
  133.     *                        FULLY spaces Theft Credit or
  134.     *                 Publication of this FILTERSCRIPT without my permission.
  135. */
RAW Paste Data