Advertisement
Mi5kas

!MP!

Sep 26th, 2014
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.09 KB | None | 0 0
  1. /*!MP! - Mirksinèios pareigos by !LukniS!
  2.  
  3. Filterscriptà labai paprasta naudoti:
  4.                                                /flashadmin duos mirksintá ADMIN uþraðà virð þaidëjo nicko
  5.                                                /flashvip duos mirksintá VIP uþraðà
  6.                                                /flashsav duos mirksintá SAVININKAS uþraðà
  7.                                                
  8. Arba komandas ir uþraðus galite nusistatyti patys per FS nustatymus.
  9.                                                
  10. */
  11. //FS nustatymai:
  12. #define FLASHKOMANDA1 "/flashadmin" //Jûsø pasirinkta komanda pirmam tekstui(komanda bûtinai turi bûti kabutëse)
  13. #define FLASHTEKSTAS1 "GAIDYS" //Jûsø pasirinktas tekstas pirmai komandai nustatytai virðuje(bûtina kabutëse)
  14. #define FLASHKOMANDA2 "/flashvip" //Jûsø pasirinkta komanda antram tekstui(kabutëse)
  15. #define FLASHTEKSTAS2 "VIP" // Jûsø pasirinktas tekstas antrai komandai(kabutëse)
  16. #define FLASHKOMANDA3 "/flashsav" //Jûsø pasirinktakomanda treèiam tekstui
  17. #define FLASHTEKSTAS3 "GAIDYS" //Jûsø pasirinktas tekstas treèiai komandai
  18. #define FLASHSPALVA ZALIA //Jûsø pasirinkta spalvà, kuri mirksës ið baltos(Galimos: GELTONA, MELYNA, ZALIA, RAUDONA(didþiosiomis raidëmis))
  19.  
  20. //Ðiø nustatymø neliesti!
  21. #include <a_samp>
  22. #define GELTONA 0xFFFF00FF
  23. #define MELYNA 0x0000FFFF
  24. #define ZALIA 0x00FF00FF
  25. #define RAUDONA 0xFF0000FF
  26. enum wtflol
  27. {
  28.   Text3D:labelis,
  29.   tekstas[24],
  30.   bool:flashina
  31. };
  32. new OMG[MAX_PLAYERS][wtflol];
  33. forward FlashinamGaidzius();
  34.  
  35. public OnFilterScriptInit()
  36. {
  37. SetTimer("FlashinamGaidzius", 500, true);
  38. return 1;
  39. }
  40.  
  41. main()
  42. {
  43.     print("!MP! uzkrautas");
  44. }
  45. public OnPlayerCommandText(playerid, cmdtext[])
  46. {
  47.     if (strcmp(FLASHKOMANDA1, cmdtext, true, 10) == 0)
  48.     {
  49.         OMG[playerid][labelis] = Create3DTextLabel(FLASHTEKSTAS1, FLASHSPALVA, 30.0, 40.0, 50.0, 40.0, 0);
  50.         Attach3DTextLabelToPlayer(OMG[playerid][labelis], playerid, 0.0, 0.0, 0.3);
  51.         OMG[playerid][flashina]=true;
  52.         format(OMG[playerid][tekstas], 24, FLASHTEKSTAS1);
  53.         return 1;
  54.     }
  55.     if (strcmp(FLASHKOMANDA2, cmdtext, true, 10) == 0)
  56.     {
  57.         OMG[playerid][labelis] = Create3DTextLabel(FLASHTEKSTAS2, FLASHSPALVA, 30.0, 40.0, 50.0, 40.0, 0);
  58.         Attach3DTextLabelToPlayer(OMG[playerid][labelis], playerid, 0.0, 0.0, 0.3);
  59.         OMG[playerid][flashina]=true;
  60.         format(OMG[playerid][tekstas], 24, FLASHTEKSTAS2);
  61.         return 1;
  62.     }
  63.     if (strcmp(FLASHKOMANDA3, cmdtext, true, 10) == 0)
  64.     {
  65.         OMG[playerid][labelis] = Create3DTextLabel(FLASHTEKSTAS3, FLASHSPALVA, 30.0, 40.0, 50.0, 40.0, 0);
  66.         Attach3DTextLabelToPlayer(OMG[playerid][labelis], playerid, 0.0, 0.0, 0.3);
  67.         OMG[playerid][flashina]=true;
  68.         format(OMG[playerid][tekstas], 24, FLASHTEKSTAS3);
  69.         return 1;
  70.     }
  71.     return 0;
  72. }
  73.  
  74. public FlashinamGaidzius()
  75. {
  76.    for(new i; i<MAX_PLAYERS; i++)
  77.    {
  78.       if(OMG[i][tekstas])
  79.       {
  80.          if(OMG[i][flashina])
  81.          {
  82.             Update3DTextLabelText(OMG[i][labelis], 0xFFFFFFFF, OMG[i][tekstas]);
  83.             OMG[i][flashina]=false;
  84.          }
  85.          else
  86.          {
  87.             Update3DTextLabelText(OMG[i][labelis], FLASHSPALVA, OMG[i][tekstas]);
  88.             OMG[i][flashina]=true;
  89.          }
  90.       }
  91.    }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement