Advertisement
Guest User

DSG include by eVasi0n aka. DiSwaG

a guest
Jul 18th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.55 KB | None | 0 0
  1. //Include by DiSwaG aka. eVasi0n
  2. #define Schleife(%1,%2) \
  3.         for(new %1 = 0; %1 != %2; %1 ++)
  4.  
  5. #define VarSchleife(%1,%2) \
  6.         for(%1 = 0; %1 != %2; %1 ++)
  7.  
  8. #define SizeSchleife(%1,%2) \
  9.         for(new %1 = 0; %1 != sizeof(%2); %1 ++)
  10.  
  11. #define VarSizeSchleife(%1,%2) \
  12.         for(%1 = 0; %1 != sizeof(%2); %1 ++)
  13.  
  14. #define InputMin(%1,%2) \
  15.         strlen(%1) < %2
  16.  
  17. #define InputMax(%1,%2) \
  18.         strlen(%1) >= %2
  19.  
  20. #define DeaktiviereEnterExit(); DisableInteriorEnterExits();
  21.  
  22. #define CJLaufstyle(); UsePlayerPedAnims();
  23.  
  24. #define SpielerMarker(%1); \
  25.         ShowPlayerMarkers(%1);
  26.  
  27. #define StuntBonus(%1); \
  28.         EnableStuntBonusForAll(%1);
  29.  
  30.  
  31. new Text:DiSwaGFade[MAX_PLAYERS],
  32.     DiSwaGTimer[MAX_PLAYERS],
  33.     FadeStatus[MAX_PLAYERS]
  34. ;
  35.  
  36. stock SetPlayerPosEx(playerid,Float:DiX,Float:DiY,Float:DiZ,Float:DiF,DiInt,DiWorld)
  37. {
  38.     SetPlayerPos(playerid,DiX,DiY,DiZ);
  39.     SetPlayerFacingAngle(playerid,DiF);
  40.     SetPlayerInterior(playerid,DiInt);
  41.     SetPlayerVirtualWorld(playerid,DiWorld);
  42.     SetCameraBehindPlayer(playerid);
  43. }
  44.  
  45. stock KickEx(playerid,const Farbe,const Grund[])
  46. {
  47.     new kickstr[128];
  48.     format(kickstr,sizeof(kickstr),"%s wurde gekickt. Grund: %s",GetNameEx(playerid),Grund);
  49.     SendClientMessageToAll(Farbe,kickstr);
  50.     return SetTimerEx("KickSpieler",100,false,"i",playerid);
  51. }
  52.  
  53. stock GetNameEx(playerid)
  54. {
  55.     new DSGName[MAX_PLAYER_NAME];
  56.     GetPlayerName(playerid,DSGName,sizeof(DSGName));
  57.     return DSGName;
  58. }
  59.  
  60. stock Freeze(playerid)
  61. {
  62.     return TogglePlayerControllable(playerid, false);
  63. }
  64.  
  65. stock Unfreeze(playerid)
  66. {
  67.     return TogglePlayerControllable(playerid, true);
  68. }
  69.  
  70. stock DiOnGameModeInit()
  71. {
  72.     Schleife(i, MAX_PLAYERS)
  73.     {
  74.         DiSwaGFade[i] = TextDrawCreate( -20.000000, 0.000000, "_");
  75.         TextDrawUseBox(DiSwaGFade[i], 1);
  76.         TextDrawBoxColor(DiSwaGFade[i], 0);
  77.         TextDrawAlignment(DiSwaGFade[i], 0);
  78.         TextDrawBackgroundColor(DiSwaGFade[i], 0);
  79.         TextDrawFont(DiSwaGFade[i], 3);
  80.         TextDrawLetterSize(DiSwaGFade[i], 1.000000, 52.200000);
  81.         TextDrawColor(DiSwaGFade[i], 0);
  82.     }
  83.     return 1;
  84. }
  85.  
  86. stock DiOnGameModeExit()
  87. {
  88.     Schleife(i, MAX_PLAYERS)
  89.     {
  90.         TextDrawHideForPlayer(i,DiSwaGFade[i]);
  91.         TextDrawDestroy(DiSwaGFade[i]);
  92.         KillTimer(DiSwaGTimer[i]);
  93.     }
  94.     return 1;
  95. }
  96.  
  97. stock DiFade(playerid,FadeZeit)
  98. {
  99.     new TimerZeit = FadeZeit * 50;
  100.     DiSwaGTimer[playerid] = SetTimerEx("DiFadeTD",TimerZeit,true,"i",playerid);
  101.     return 1;
  102. }
  103.  
  104. forward DiFadeTD(playerid);
  105. public DiFadeTD(playerid)
  106. {
  107.     switch(FadeStatus[playerid])
  108.     {
  109.         case 1:
  110.         {
  111.             TextDrawBoxColor(DiSwaGFade[playerid], 25);
  112.         }
  113.         case 2:
  114.         {
  115.             TextDrawBoxColor(DiSwaGFade[playerid], 50);
  116.         }
  117.         case 3:
  118.         {
  119.             TextDrawBoxColor(DiSwaGFade[playerid], 75);
  120.         }
  121.         case 4:
  122.         {
  123.             TextDrawBoxColor(DiSwaGFade[playerid], 100);
  124.         }
  125.         case 5:
  126.         {
  127.             TextDrawBoxColor(DiSwaGFade[playerid], 125);
  128.         }
  129.         case 6:
  130.         {
  131.             TextDrawBoxColor(DiSwaGFade[playerid], 150);
  132.         }
  133.         case 7:
  134.         {
  135.             TextDrawBoxColor(DiSwaGFade[playerid], 175);
  136.         }
  137.         case 8:
  138.         {
  139.             TextDrawBoxColor(DiSwaGFade[playerid], 200);
  140.         }
  141.         case 9:
  142.         {
  143.             TextDrawBoxColor(DiSwaGFade[playerid], 225);
  144.         }
  145.         case 10:
  146.         {
  147.             TextDrawBoxColor(DiSwaGFade[playerid], 250);
  148.         }
  149.         case 11:
  150.         {
  151.             TextDrawBoxColor(DiSwaGFade[playerid], 225);
  152.         }
  153.         case 12:
  154.         {
  155.             TextDrawBoxColor(DiSwaGFade[playerid], 200);
  156.         }
  157.         case 13:
  158.         {
  159.             TextDrawBoxColor(DiSwaGFade[playerid], 175);
  160.         }
  161.         case 14:
  162.         {
  163.             TextDrawBoxColor(DiSwaGFade[playerid], 159);
  164.         }
  165.         case 15:
  166.         {
  167.             TextDrawBoxColor(DiSwaGFade[playerid], 125);
  168.         }
  169.         case 16:
  170.         {
  171.             TextDrawBoxColor(DiSwaGFade[playerid], 100);
  172.         }
  173.         case 17:
  174.         {
  175.             TextDrawBoxColor(DiSwaGFade[playerid], 75);
  176.         }
  177.         case 18:
  178.         {
  179.             TextDrawBoxColor(DiSwaGFade[playerid], 50);
  180.         }
  181.         case 19:
  182.         {
  183.             TextDrawBoxColor(DiSwaGFade[playerid], 25);
  184.         }
  185.         case 20:
  186.         {
  187.             TextDrawBoxColor(DiSwaGFade[playerid], 0);
  188.             KillTimer(DiSwaGTimer[playerid]);
  189.             TextDrawHideForPlayer(playerid,DiSwaGFade[playerid]);
  190.             FadeStatus[playerid] = 0;
  191.             return true;
  192.         }
  193.     }
  194.     TextDrawHideForPlayer(playerid,DiSwaGFade[playerid]);
  195.     TextDrawShowForPlayer(playerid,DiSwaGFade[playerid]);
  196.     return FadeStatus[playerid] ++;
  197. }
  198.  
  199. forward KickSpieler(playerid);
  200. public KickSpieler(playerid)
  201. {
  202.     return Kick(playerid);
  203. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement