Advertisement
Pablo_Borsellino

[Include] pBoom

Oct 18th, 2011
607
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 6.16 KB | None | 0 0
  1. /**************************************************************** pBoom v1.0 ***
  2. *
  3. * Scriptname:
  4. * -» pBoom
  5. *
  6. * Author:
  7. * -» Pablo_Borsellino
  8. *
  9. * Creation Date:
  10. * -» 17th October 2011
  11. *
  12. * Release Date:
  13. * -» 18th October 2011
  14. *
  15. * Version:
  16. * -» 1.0
  17. *
  18. * Need to use:
  19. * -» Sa:Mp 0.3d RC5-3 or higher
  20. *
  21. * Language:
  22. * -» English
  23. *
  24. * Description:
  25. * -» Some new Function's, for a exploding Text.
  26. *
  27. * Functions:
  28. * -» SetPlayerBoom(playerid,Text[]);
  29. * -» StopPlayerBoom(playerid);
  30. * -» IfPlayerBoom(playerid)
  31. *
  32. * Public's:
  33. * -» n/a
  34. *
  35. * Credit's:
  36. * -» n/a
  37. *                                           Copyright © 2011 by Pablo_Borsellino
  38. *******************************************************************************/
  39. //____________________________________________________________________Variable's
  40. new Text:_pBoom_TD_Sprite[MAX_PLAYERS],
  41.     Text:_pBoom_TD_Text[MAX_PLAYERS],
  42.     _pBoom_Player_Ticks[MAX_PLAYERS],
  43.     bool:_pBoom_Player_Booms[MAX_PLAYERS];
  44.  
  45. //____________________________________________________________________Function's
  46. stock SetPlayerBoom(playerid,Text[])
  47. {
  48.     if(_pBoom_Player_Booms[playerid]==false){
  49.         _pBoom_TD_Sprite[playerid]=TextDrawCreate(260,40,"LD_NONE:explm01");
  50.         TextDrawFont(_pBoom_TD_Sprite[playerid],4);
  51.         TextDrawColor(_pBoom_TD_Sprite[playerid],0xFFFFFFFF);
  52.         TextDrawTextSize(_pBoom_TD_Sprite[playerid],140,140);
  53.         TextDrawShowForPlayer(playerid,_pBoom_TD_Sprite[playerid]);
  54.         _pBoom_TD_Text[playerid]=TextDrawCreate(321,95,Text);
  55.         TextDrawAlignment(_pBoom_TD_Text[playerid],2);
  56.         TextDrawBackgroundColor(_pBoom_TD_Text[playerid],0xF1FE01FF);
  57.         TextDrawFont(_pBoom_TD_Text[playerid],0);
  58.         TextDrawLetterSize(_pBoom_TD_Text[playerid],1.11,3.3);
  59.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000000);
  60.         TextDrawSetOutline(_pBoom_TD_Text[playerid],0);
  61.         TextDrawSetProportional(_pBoom_TD_Text[playerid],1);
  62.         TextDrawSetShadow(_pBoom_TD_Text[playerid],1);
  63.         _pBoom_Player_Ticks[playerid]=10;
  64.         SetTimerEx("_pBoom_Player_Timer",75,false,"d",playerid);
  65.         _pBoom_Player_Booms[playerid]=true;
  66.     }
  67.     return true;
  68. }
  69.  
  70. stock IfPlayerBoom(playerid)
  71. {
  72.     if(_pBoom_Player_Booms[playerid]==false)return false;
  73.     return true;
  74. }
  75.  
  76. stock StopPlayerBoom(playerid)
  77. {
  78.     if(_pBoom_Player_Booms[playerid]==true){
  79.         TextDrawDestroy(_pBoom_TD_Text[playerid]);
  80.         TextDrawDestroy(_pBoom_TD_Sprite[playerid]);
  81.         _pBoom_Player_Booms[playerid]=false;
  82.         _pBoom_Player_Ticks[playerid]=-7;
  83.     }
  84.     return true;
  85. }
  86.  
  87.  
  88. //______________________________________________________________________Public's
  89. forward _pBoom_Player_Timer(playerid);
  90. public _pBoom_Player_Timer(playerid){
  91.     if(_pBoom_Player_Ticks[playerid]==10){
  92.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000011);
  93.         TextDrawSetString(_pBoom_TD_Sprite[playerid],"LD_NONE:explm02");
  94.     }else if(_pBoom_Player_Ticks[playerid]==9){
  95.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000033);
  96.         TextDrawSetString(_pBoom_TD_Sprite[playerid],"LD_NONE:explm03");
  97.     }else if(_pBoom_Player_Ticks[playerid]==8){
  98.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000044);
  99.         TextDrawSetString(_pBoom_TD_Sprite[playerid],"LD_NONE:explm04");
  100.     }else if(_pBoom_Player_Ticks[playerid]==7){
  101.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000066);
  102.         TextDrawSetString(_pBoom_TD_Sprite[playerid],"LD_NONE:explm05");
  103.     }else if(_pBoom_Player_Ticks[playerid]==6){
  104.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000077);
  105.         TextDrawSetString(_pBoom_TD_Sprite[playerid],"LD_NONE:explm06");
  106.     }else if(_pBoom_Player_Ticks[playerid]==5){
  107.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000099);
  108.         TextDrawSetString(_pBoom_TD_Sprite[playerid],"LD_NONE:explm07");
  109.     }else if(_pBoom_Player_Ticks[playerid]==4){
  110.         TextDrawColor(_pBoom_TD_Text[playerid],0x000000FF);
  111.         TextDrawSetString(_pBoom_TD_Sprite[playerid],"LD_NONE:explm08");
  112.     }else if(_pBoom_Player_Ticks[playerid]==3){
  113.         TextDrawSetString(_pBoom_TD_Sprite[playerid],"LD_NONE:explm09");
  114.     }else if(_pBoom_Player_Ticks[playerid]==2){
  115.         TextDrawSetString(_pBoom_TD_Sprite[playerid],"LD_NONE:explm10");
  116.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000099);
  117.         TextDrawBackgroundColor(_pBoom_TD_Text[playerid],0xF1FE0199);
  118.     }else if(_pBoom_Player_Ticks[playerid]==1){
  119.         TextDrawSetString(_pBoom_TD_Sprite[playerid],"LD_NONE:explm11");
  120.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000088);
  121.         TextDrawBackgroundColor(_pBoom_TD_Text[playerid],0xF1FE0188);
  122.     }else if(_pBoom_Player_Ticks[playerid]==0){
  123.         TextDrawSetString(_pBoom_TD_Sprite[playerid],"LD_NONE:explm12");
  124.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000077);
  125.         TextDrawBackgroundColor(_pBoom_TD_Text[playerid],0xF1FE0177);
  126.     }else if(_pBoom_Player_Ticks[playerid]==-1){
  127.         TextDrawColor(_pBoom_TD_Sprite[playerid],0x00000088);
  128.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000066);
  129.         TextDrawBackgroundColor(_pBoom_TD_Text[playerid],0xF1FE0166);
  130.     }else if(_pBoom_Player_Ticks[playerid]==-2){
  131.         TextDrawColor(_pBoom_TD_Sprite[playerid],0x00000066);
  132.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000055);
  133.         TextDrawBackgroundColor(_pBoom_TD_Text[playerid],0xF1FE0155);
  134.     }else if(_pBoom_Player_Ticks[playerid]==-3){
  135.         TextDrawColor(_pBoom_TD_Sprite[playerid],0x00000044);
  136.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000044);
  137.         TextDrawBackgroundColor(_pBoom_TD_Text[playerid],0xF1FE0144);
  138.     }else if(_pBoom_Player_Ticks[playerid]==-4){
  139.         TextDrawColor(_pBoom_TD_Sprite[playerid],0x00000022);
  140.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000033);
  141.         TextDrawBackgroundColor(_pBoom_TD_Text[playerid],0xF1FE0133);
  142.     }else if(_pBoom_Player_Ticks[playerid]==-5){
  143.         TextDrawDestroy(_pBoom_TD_Sprite[playerid]);
  144.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000022);
  145.         TextDrawBackgroundColor(_pBoom_TD_Text[playerid],0xF1FE0122);
  146.     }else if(_pBoom_Player_Ticks[playerid]==-6){
  147.         TextDrawColor(_pBoom_TD_Text[playerid],0x00000011);
  148.         TextDrawBackgroundColor(_pBoom_TD_Text[playerid],0xF1FE0111);
  149.     }else if(_pBoom_Player_Ticks[playerid]==-7){
  150.         TextDrawDestroy(_pBoom_TD_Text[playerid]);
  151.         _pBoom_Player_Booms[playerid]=false;
  152.         return true;
  153.     }
  154.     TextDrawShowForPlayer(playerid,_pBoom_TD_Sprite[playerid]);
  155.     TextDrawShowForPlayer(playerid,_pBoom_TD_Text[playerid]);
  156.     _pBoom_Player_Ticks[playerid]--;
  157.     SetTimerEx("_pBoom_Player_Timer",75,false,"d",playerid);
  158.     return true;
  159. }
  160.  
  161.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement