pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

pastebin - collaborative debugging tool View Help


Posted by Pwnzor on Sun 8 Nov 04:02
report abuse | View followups from kerri and aaaaaaaaaaaaaaaaaaaaaaaa | download | new post

  1. #include <a_samp>
  2.  
  3.  
  4.  
  5. /*
  6. ¤¤¥±Anim-Master (BETA)±¥¤¤
  7.  
  8. ¤¤¥±This is the beta of the animation menu¤¤±¥
  9. ¤¤¥±Please note that this is a beta not everything is done
  10. ¤¤¥±Credits: Pwnzor ,Donny for this amazing menu±¥¤¤
  11. ¤¤¤¤
  12. ¤¤Last Updated Nov,8,2009¤¤
  13.  
  14. */
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. //#define IGNORE_SPAWN_MESSAGES //uncomment #define IGNORE_SPAWN_MESSAGES if you would like to stop it from saying anything upon connection
  34.  
  35.  
  36. #define DEFAULT_RESPAWN_TIME        600 /* ten minutes */
  37.  
  38. #if !defined IGNORE_VEHICLE_DELETION
  39.         new
  40.             bool:gDialogCreated[ MAX_VEHICLES ] = { false, ... };
  41. #endif
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57. ShowPlayerDefaultDialog( playerid )
  58. {
  59.         ShowPlayerDialog( playerid, 3434, DIALOG_STYLE_LIST, "Animation Menu (BETA)","Drinking/Smoking\nDancing\nSitting/Hands\nStop animation", "Select", "Close" );
  60.         return 1;
  61. }
  62.  
  63. public OnFilterScriptInit()
  64. {
  65.         printf( "   * Anim-Master version 4.0a loaded *         " );
  66.         return 1;
  67. }
  68.  
  69. public OnFilterScriptExit()
  70. {
  71.         printf( "   * Anim-Master version 4.0a unloaded *               " );
  72.         return 1;
  73. }
  74.  
  75. public OnPlayerSpawn( playerid )
  76. {
  77.         #if !defined IGNORE_SPAWN_MESSAGES
  78.                 SendClientMessage( playerid, 0xFFFFFFFF, "[Mini-Helper]: Type /animmenu to use the animations " );
  79.         #endif
  80.  
  81.         return 1;
  82. }
  83.  
  84. public OnPlayerCommandText( playerid, cmdtext[] )
  85. {
  86.         if ( strcmp( cmdtext, "/animmenu", true, 8 ) == 0 )
  87.         {
  88.             if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
  89.             {
  90.                         #if !defined IGNORE_VEHICLE_ACTIVATION
  91.                         ShowPlayerDefaultDialog( playerid );
  92.                         return 1;
  93.                         #endif
  94.                 }
  95.                
  96.                
  97.                
  98.                
  99.                
  100.                
  101.                
  102.        
  103.                
  104.                
  105.                
  106.                
  107.  
  108.                 if ( GetPlayerState( playerid ) != PLAYER_STATE_PASSENGER ) ShowPlayerDefaultDialog( playerid );
  109.             return 1;
  110.         }
  111.         return 0;
  112. }
  113.  
  114. public OnVehicleSpawn( vehicleid )
  115. {
  116.        
  117.         return 1;
  118. }
  119.  
  120. public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[] )
  121. {
  122.         if ( response )
  123.         {
  124.                 switch ( dialogid )
  125.                 {
  126.                         case 3434 :
  127.                         {
  128.                         switch ( listitem )
  129.                                 {
  130.                                        
  131.                                         case 0 : ShowPlayerDialog( playerid, 3435, DIALOG_STYLE_LIST, "Drinking/Smoking", "Drink Beer\nSmoke Cigar\nDrink Wine\nDrink Sprunk\nBack", "Ok", "Close" );
  132.                                     case 1 : ShowPlayerDialog( playerid, 3440, DIALOG_STYLE_LIST, "Dancing", "Dance number 1\nDance number 2\nDance number 3\nDance number 4\nBack", "Ok", "Close" );
  133.                                     case 2 : ShowPlayerDialog( playerid, 3441, DIALOG_STYLE_LIST, "Cellphone/Hands", "Hands up\nUse cellphone\nStop using cellphone\nBack", "Ok", "Close" );
  134.                                     case 3 : ShowPlayerDialog( playerid, 3436, DIALOG_STYLE_LIST, "Stop animation", "Stop Animation\nBack", "Ok", "Close" );
  135.                                    
  136.                                
  137.                                 }
  138.                         }
  139.                         case 3435 :
  140.                         {
  141.                                 if ( listitem > 10 ) return ShowPlayerDefaultDialog( playerid );
  142.  
  143.                                 new
  144.                                 model_array[] = { 20, 21, 22, 23, };
  145.  
  146.                                 return SetPlayerSpecialAction( playerid, model_array[ listitem ] );
  147.                         }
  148.                         case 3436 :
  149.                         {
  150.                                 if ( listitem > 8 ) return ShowPlayerDefaultDialog( playerid );
  151.  
  152.                         new
  153.                         model_array[] = { 1, };
  154.  
  155.                                 return ClearAnimations( playerid, model_array[ listitem ] );
  156.                         }
  157.                         case 3437 :
  158.                         {
  159.                                 if ( listitem > 12 ) return ShowPlayerDefaultDialog( playerid );
  160.  
  161.                                 new
  162.                                         model_array[] = { 1, 15, 20, 30, 40, 45, 50, 55, 60, 65, 70, 75, 131 };
  163.  
  164.                                 return SetPlayerSkin( playerid, model_array[ listitem ] );
  165.                         }
  166.                         case 3438 :
  167.                         {
  168.                                 if ( listitem > 3 ) return ShowPlayerDefaultDialog( playerid );
  169.  
  170.                                 new
  171.                                         model_array[] = { 480, 533, 570, 600,800,1000,2000,3000,4000,5000,6000,7000 };
  172.  
  173.                                 return SetPlayerSkin( playerid, model_array[ listitem ] );
  174.                         }
  175.                         case 3439 :
  176.                         {
  177.                                 if ( listitem > 24 ) return ShowPlayerDefaultDialog( playerid );
  178.  
  179.                                 new
  180.                                 model_array[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 478, 456, 554 };
  181.  
  182.                                 return SetPlayerTime( playerid, model_array[ listitem ] );
  183.                         }
  184.                         case 3440 :
  185.                         {
  186.                                 if ( listitem > 7 ) return ShowPlayerDefaultDialog( playerid );
  187.  
  188.                         new
  189.                             model_array[] = { 5, 6, 7, 8, };
  190.  
  191.                                 return SetPlayerSpecialAction( playerid, model_array[ listitem ] );
  192.                         }
  193.                         case 3441 :
  194.                         {
  195.                                 if ( listitem > 12 ) return ShowPlayerDefaultDialog( playerid );
  196.  
  197.                         new
  198.                             model_array[] = { 10, 11, 12,13, };
  199.  
  200.                                 return SetPlayerSpecialAction ( playerid, model_array[ listitem ] );
  201.                         }
  202.                         case 3442 :
  203.                         {
  204.                                 if ( listitem > 17 ) return ShowPlayerDefaultDialog( playerid );
  205.  
  206.                                 new
  207.                                 model_array[] = { 1010, 433, 431, 438, 437, 523, 427, 490, 528, 407, 544, 596, 598, 597, 599, 432, 601, 420 };
  208.  
  209.                                 return AddVehicleComponent( playerid, model_array[ listitem ] );
  210.                         }
  211.                         case 3443 :
  212.                         {
  213.                                 if ( listitem > 33 ) return ShowPlayerDefaultDialog( playerid );
  214.  
  215.                             new
  216.                             model_array[] = { 445, 504, 401, 518, 527, 542, 507, 562, 585, 419, 526, 604, 466, 492, 474, 546, 517, 410, 551, 516, 467, 600, 426, 436, 547, 405, 580, 560, 550, 549, 540, 491, 529, 421 };
  217.  
  218.                                 return SetPlayerSkin( playerid, model_array[ listitem ] );
  219.                         }
  220.                         case 3444 :
  221.                         {
  222.                                 if ( listitem > 19 ) return ShowPlayerDefaultDialog( playerid );
  223.  
  224.                         new
  225.                             model_array[] = { 602, 429, 496, 402, 541, 415, 589, 587, 565, 494, 502, 503, 411, 559, 603, 475, 506, 451, 558, 477 };
  226.  
  227.                                 return SetPlayerSkin( playerid, model_array[ listitem ] );
  228.                         }
  229.                         case 3445 :
  230.                         {
  231.                                 if ( listitem > 4 ) return ShowPlayerDefaultDialog( playerid );
  232.  
  233.                                 new
  234.                                 model_array[] = { 418, 404, 479, 458, 561 };
  235.  
  236.                                 return SetPlayerSkin( playerid, model_array[ listitem ] );
  237.                         }
  238.                         case 3446 :
  239.                         {
  240.                                 if ( listitem > 9 ) return ShowPlayerDefaultDialog( playerid );
  241.  
  242.                     new
  243.                             model_array[] = { 472, 473, 493, 595, 484, 430, 453, 452, 446, 454 };
  244.  
  245.                                 return SetPlayerSkin( playerid, model_array[ listitem ] );
  246.                         }
  247.                         case 3447 :
  248.                         {
  249.                                 if ( listitem > 11 ) return ShowPlayerDefaultDialog( playerid );
  250.  
  251.                         new
  252.                             model_array[] = { 435, 450, 591, 606, 607, 610, 569, 590, 584, 570, 608, 611 };
  253.  
  254.                                 return SetPlayerSkin( playerid, model_array[ listitem ] );
  255.                         }
  256.                         case 3448 :
  257.                         {
  258.                                 if ( listitem > 23 ) return ShowPlayerDefaultDialog( playerid );
  259.  
  260.                     new
  261.                             model_array[] = { 485, 537, 457, 483, 508, 532, 486, 406, 530, 538, 434, 545, 588, 571, 572, 423, 442, 428, 409, 574, 449, 525, 583, 539 };
  262.  
  263.                                 return SetPlayerSkin( playerid, model_array[ listitem ] );
  264.                         }
  265.                         case 3449 :
  266.                         {
  267.                                 if ( listitem > 5 ) return ShowPlayerDefaultDialog( playerid );
  268.  
  269.                     new
  270.                             model_array[] = { 441, 464, 465, 501, 564, 594 };
  271.  
  272.                                 return SetPlayerSkin( playerid, model_array[ listitem ] );
  273.                         }
  274.                 }
  275.         }
  276.         return 0;
  277. }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me so that I can delete my post