Advertisement
xt3z0ne

Special Skin /sskin

Feb 14th, 2015
536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 10.95 KB | None | 0 0
  1. /*
  2. ********************************************************************************
  3.  
  4.                     Special Skin By JohnnyYz
  5.                     Credits JohnnyYz
  6.                     WebSite: www.necro-zone.com | www.rss-ro.com
  7.  
  8. ********************************************************************************
  9. */
  10. #include     " a_samp  "
  11. #include     " zcmd    "
  12. #include     " sscanf2 "
  13. //******************************************************************************
  14. new Text:SSkin [ 10 ];
  15. new Holds [ 20 ];
  16. //******************************************************************************
  17.  
  18. AntiDeAMX()
  19. {
  20.     new a[][] =
  21.     {
  22.         "Unarmed (Fist)",
  23.         "Brass K"
  24.     };
  25.     #pragma unused a
  26. }
  27.  
  28. //******************************************************************************
  29. public OnFilterScriptInit()
  30. {
  31.     AntiDeAMX();
  32.  
  33.     SSkin [ 0 ] = TextDrawCreate(527.599914, 176.966644, "Skin_Box");
  34.     TextDrawLetterSize(SSkin [ 0 ], 0.000000, 12.791481);
  35.     TextDrawTextSize(SSkin [ 0 ], 131.600021, 0.000000);
  36.     TextDrawAlignment(SSkin [ 0 ], 1);
  37.     TextDrawColor(SSkin [ 0 ], -1378294017);
  38.     TextDrawUseBox(SSkin [ 0 ], true);
  39.     TextDrawBoxColor(SSkin [ 0 ], 94);
  40.     TextDrawSetShadow(SSkin [ 0 ], 0);
  41.     TextDrawSetOutline(SSkin [ 0 ], 0);
  42.     TextDrawBackgroundColor(SSkin [ 0 ], 16777215);
  43.     TextDrawFont(SSkin [ 0 ], 0);
  44.  
  45.     SSkin [ 1 ] = TextDrawCreate(160.800033, 272.533264, "Skin 230");
  46.     TextDrawLetterSize(SSkin [ 1 ], 0.449999, 1.600000);
  47.     TextDrawTextSize(SSkin [ 1 ], -873.599914, -210.559967);
  48.     TextDrawAlignment(SSkin [ 1 ], 1);
  49.     TextDrawColor(SSkin [ 1 ], -1);
  50.     TextDrawSetShadow(SSkin [ 1 ], 0);
  51.     TextDrawSetOutline(SSkin [ 1 ], 1);
  52.     TextDrawBackgroundColor(SSkin [ 1 ], 51);
  53.     TextDrawFont(SSkin [ 1 ], 1);
  54.     TextDrawSetProportional(SSkin [ 1 ], 1);
  55.  
  56.     SSkin [ 2 ] = TextDrawCreate(129.599914, 170.986526, "230");
  57.     TextDrawLetterSize(SSkin [ 2 ], 0.449999, 1.600000);
  58.     TextDrawTextSize(SSkin [ 2 ], 128.800003, 106.773330);
  59.     TextDrawAlignment(SSkin [ 2 ], 1);
  60.     TextDrawColor(SSkin [ 2 ], -1);
  61.     TextDrawUseBox(SSkin [ 2 ], true);
  62.     TextDrawBackgroundColor(SSkin [ 2 ], 0);
  63.     TextDrawBoxColor(SSkin [ 2 ], 0);
  64.     TextDrawSetShadow(SSkin [ 2 ], 0);
  65.     TextDrawSetOutline(SSkin [ 2 ], 1);
  66.     TextDrawFont(SSkin [ 2 ], 5);
  67.     TextDrawSetProportional(SSkin [ 2 ], 1);
  68.     TextDrawSetPreviewModel(SSkin [ 2 ], 230);
  69.     TextDrawSetPreviewRot(SSkin [ 2 ], 0.000000, 0.000000, 0.000000, 1.000000);
  70.  
  71.     SSkin [ 3 ] = TextDrawCreate(289.599822, 271.786834, "Skin 170");
  72.     TextDrawLetterSize(SSkin [ 3 ], 0.449999, 1.600000);
  73.     TextDrawAlignment(SSkin [ 3 ], 1);
  74.     TextDrawColor(SSkin [ 3 ], -1);
  75.     TextDrawSetShadow(SSkin [ 3 ], 0);
  76.     TextDrawSetOutline(SSkin [ 3 ], 1);
  77.     TextDrawBackgroundColor(SSkin [ 3 ], 51);
  78.     TextDrawFont(SSkin [ 3 ], 1);
  79.     TextDrawSetProportional(SSkin [ 3 ], 1);
  80.  
  81.     SSkin [ 4 ] = TextDrawCreate(264.799987, 173.973297, "170");
  82.     TextDrawLetterSize(SSkin [ 4 ], 0.449999, 1.600000);
  83.     TextDrawTextSize(SSkin [ 4 ], 109.599967, 97.813423);
  84.     TextDrawAlignment(SSkin [ 4 ], 1);
  85.     TextDrawColor(SSkin [ 4 ], -1);
  86.     TextDrawUseBox(SSkin [ 4 ], true);
  87.     TextDrawBackgroundColor(SSkin [ 4 ], 0);
  88.     TextDrawBoxColor(SSkin [ 4 ], 0);
  89.     TextDrawSetShadow(SSkin [ 4 ], 0);
  90.     TextDrawSetOutline(SSkin [ 4 ], 1);
  91.     TextDrawFont(SSkin [ 4 ], 5);
  92.     TextDrawSetProportional(SSkin [ 4 ], 1);
  93.     TextDrawSetPreviewModel(SSkin [ 4 ], 170);
  94.     TextDrawSetPreviewRot(SSkin [ 4 ], 0.000000, 0.000000, 0.000000, 1.000000);
  95.  
  96.     SSkin [ 5 ] = TextDrawCreate(432.000152, 272.533294, "Stop Hold");
  97.     TextDrawLetterSize(SSkin [ 5 ], 0.449999, 1.600000);
  98.     TextDrawAlignment(SSkin [ 5 ], 1);
  99.     TextDrawColor(SSkin [ 5 ], -1);
  100.     TextDrawSetShadow(SSkin [ 5 ], 0);
  101.     TextDrawSetOutline(SSkin [ 5 ], 1);
  102.     TextDrawBackgroundColor(SSkin [ 5 ], 51);
  103.     TextDrawFont(SSkin [ 5 ], 1);
  104.     TextDrawSetProportional(SSkin [ 5 ], 1);
  105.  
  106.     SSkin [ 6 ] = TextDrawCreate(400.000152, 173.973220, "176");
  107.     TextDrawLetterSize(SSkin [ 6 ], 0.449999, 1.600000);
  108.     TextDrawTextSize(SSkin [ 6 ], 121.599960, 99.306655);
  109.     TextDrawAlignment(SSkin [ 6 ], 1);
  110.     TextDrawColor(SSkin [ 6 ], -1);
  111.     TextDrawUseBox(SSkin [ 6 ], true);
  112.     TextDrawBackgroundColor(SSkin [ 6 ], 0);
  113.     TextDrawBoxColor(SSkin [ 6 ], 0);
  114.     TextDrawSetShadow(SSkin [ 6 ], 0);
  115.     TextDrawSetOutline(SSkin [ 6 ], 1);
  116.     TextDrawFont(SSkin [ 6 ], 5);
  117.     TextDrawSetProportional(SSkin [ 6 ], 1);
  118.     TextDrawSetPreviewModel(SSkin [ 6 ], 176);
  119.     TextDrawSetPreviewRot(SSkin [ 6 ], 0.000000, 0.000000, 0.000000, 1.000000);
  120. //******************************************************************************
  121.     TextDrawSetSelectable(SSkin [ 1 ], false);
  122.     TextDrawSetSelectable(SSkin [ 2 ], true);
  123.     TextDrawSetSelectable(SSkin [ 3 ], true);
  124.     TextDrawSetSelectable(SSkin [ 4 ], true);
  125.     TextDrawSetSelectable(SSkin [ 5 ], true);
  126.     TextDrawSetSelectable(SSkin [ 6 ], true);
  127. //******************************************************************************
  128.     return 1;
  129. }
  130.  
  131. public OnFilterScriptExit()
  132. {
  133.     TextDrawDestroy(SSkin [ 0 ]);
  134.     TextDrawDestroy(SSkin [ 1 ]);
  135.     TextDrawDestroy(SSkin [ 2 ]);
  136.     TextDrawDestroy(SSkin [ 3 ]);
  137.     TextDrawDestroy(SSkin [ 4 ]);
  138.     TextDrawDestroy(SSkin [ 5 ]);
  139.     TextDrawDestroy(SSkin [ 6 ]);
  140.     return 1;
  141. }
  142. //******************************************************************************
  143. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  144. {
  145.         if(_:clickedid != 65535)
  146.         {
  147.             if(clickedid == SSkin [ 2 ])
  148.                 {
  149.                     Holds [ 0 ] = SetPlayerAttachedObject(playerid, 0, 355, 1, -0.165000, -0.109999, 0.085000, 5.899998, 37.900001, -4.200002, 1.000000, 1.000000, 1.000000, 0, 0);
  150.                     Holds [ 1 ] = SetPlayerAttachedObject(playerid, 1, 19079, 1, 0.289000, -0.045999, 0.168000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000, 0, 0);
  151.                     Holds [ 2 ] = SetPlayerAttachedObject(playerid, 2, 19315, 1, -0.816000, 0.000000, 0.493000, 90.799987, 86.199974, -0.399999, 1.000000, 1.000000, 1.000000, 0, 0);
  152.                     Holds [ 3 ] = SetPlayerAttachedObject(playerid, 3, 18688, 1, -0.813999, -0.027999, -1.673000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000, 0, 0);
  153.                     HideSSkin( playerid );
  154.                     SetPlayerSkin(playerid, 230);
  155.  
  156.                 }
  157.             if(clickedid == SSkin [ 4 ])
  158.                 {
  159.                     Holds [ 4 ] = SetPlayerAttachedObject(playerid, 0, 19314, 1, 0.173999, -0.163999, 0.000000, 0.000000, 0.000000, -152.200027, 1.000000, 1.000000, 1.000000, 0, 0);
  160.                     Holds [ 5 ] = SetPlayerAttachedObject(playerid, 1, 19320, 1, 0.536999, 0.000000, 0.000000, -102.700012, 92.299995, 25.499996, 1.000000, 1.000000, 1.000000, 0, 0);
  161.                     Holds [ 6 ] = SetPlayerAttachedObject(playerid, 2, 359, 1, 0.546000, 0.000000, 0.222000, 77.899986, 85.200027, 0.000000, 0.890000, 1.090999, 0.917999, 0, 0);
  162.                     Holds [ 7 ] = SetPlayerAttachedObject(playerid, 3, 18689, 1, -0.533000, 0.000000, -0.119000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0, 0);
  163.                     HideSSkin( playerid );
  164.                     SetPlayerSkin(playerid, 170);
  165.  
  166.                 }
  167.             if(clickedid == SSkin [ 6 ])
  168.                 {
  169.                     Holds [ 8 ] = SetPlayerAttachedObject(playerid, 0, 18693, 1, -2.028999, 0.126000, -0.595999, 11.499996, 81.700004, 0.000000, 1.000000, 1.000000, 1.000000, 0, 0);
  170.                     Holds [ 9 ] = SetPlayerAttachedObject(playerid, 1, 18693, 1, -1.991999, 0.222000, 0.026000, 11.499996, 81.700004, 0.000000, 1.000000, 1.000000, 1.000000, 0, 0);
  171.                     Holds [ 10 ] = SetPlayerAttachedObject(playerid, 2, 349, 1, 0.000000, -0.164000, -0.013999, 0.000000, 26.099994, 0.000000, 1.000000, 1.000000, 1.000000, 0, 0);
  172.                     Holds [ 11 ] = SetPlayerAttachedObject(playerid, 3, 19343, 1, -1.033999, 0.083000, -0.063000, 0.000000, 93.399993, -27.699998, 1.464999, 1.299999, 1.186999, 0, 0);
  173.                     HideSSkin( playerid );
  174.                     SetPlayerSkin(playerid, 176);
  175.  
  176.                 }
  177.             if(clickedid == SSkin [ 5 ])
  178.                 {
  179.                     HideSSkin( playerid );
  180.                     RemoveHolds( playerid );
  181.                     SetPlayerSkin(playerid, 176);
  182.  
  183.                 }
  184.         }
  185.         return 1;
  186. }
  187. //******************************************************************************
  188. COMMAND:sskin(playerid, params[])
  189. {
  190.       ShowSSkin( playerid );
  191.       return 1;
  192. }
  193. //******************************************************************************
  194. stock ShowSSkin( playerid )
  195. {
  196.       TextDrawShowForPlayer(playerid,SSkin [ 0 ]);
  197.       TextDrawShowForPlayer(playerid,SSkin [ 2 ]);
  198.       TextDrawShowForPlayer(playerid,SSkin [ 4 ]);
  199.       TextDrawShowForPlayer(playerid,SSkin [ 5 ]);
  200.       TextDrawShowForPlayer(playerid,SSkin [ 6 ]);
  201. //******************************************************************************
  202.       SelectTextDraw(playerid, 0x91B5BAFF);
  203.       return 1;
  204. }
  205. //******************************************************************************
  206. stock HideSSkin( playerid )
  207. {
  208.         TextDrawHideForPlayer(playerid,SSkin [ 0 ]);
  209.         TextDrawHideForPlayer(playerid,SSkin [ 1 ]);
  210.         TextDrawHideForPlayer(playerid,SSkin [ 2 ]);
  211.         TextDrawHideForPlayer(playerid,SSkin [ 3 ]);
  212.         TextDrawHideForPlayer(playerid,SSkin [ 4 ]);
  213.         TextDrawHideForPlayer(playerid,SSkin [ 5 ]);
  214.         TextDrawHideForPlayer(playerid,SSkin [ 6 ]);
  215.         CancelSelectTextDraw(playerid);
  216.         return 1;
  217. }
  218. //******************************************************************************
  219. stock RemoveHolds( playerid )
  220. {
  221.         for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
  222.            {
  223.              if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
  224.            }
  225.         return 1;
  226. }
  227. //******************************************************************************
  228. stock SetPlayerSkinFix(playerid, skinid)
  229. {
  230.     new
  231.         Float:tmpPos[4],
  232.         vehicleid = GetPlayerVehicleID(playerid),
  233.         seatid = GetPlayerVehicleSeat(playerid);
  234.     GetPlayerPos(playerid, tmpPos[0], tmpPos[1], tmpPos[2]);
  235.     GetPlayerFacingAngle(playerid, tmpPos[3]);
  236.     if(skinid < 0 || skinid > 299) return 0;
  237.     if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK)
  238.     {
  239.         SetPlayerPos(playerid, tmpPos[0], tmpPos[1], tmpPos[2]);
  240.         SetPlayerFacingAngle(playerid, tmpPos[3]);
  241.         TogglePlayerControllable(playerid, 1);
  242.         return SetPlayerSkin(playerid, skinid);
  243.     }
  244.     else if(IsPlayerInAnyVehicle(playerid))
  245.     {
  246.         new
  247.             tmp;
  248.         RemovePlayerFromVehicle(playerid);
  249.         SetPlayerPos(playerid, tmpPos[0], tmpPos[1], tmpPos[2]);
  250.         SetPlayerFacingAngle(playerid, tmpPos[3]);
  251.         TogglePlayerControllable(playerid, 1);
  252.         tmp = SetPlayerSkin(playerid, skinid);
  253.         PutPlayerInVehicle(playerid, vehicleid, (seatid == 128) ? 0 : seatid);
  254.         return tmp;
  255.     }
  256.     else
  257.     {
  258.         return SetPlayerSkin(playerid, skinid);
  259.     }
  260. }
  261. /*
  262. ********************************************************************************
  263.  
  264.                     Special Skin By JohnnyYz
  265.                     Credits JohnnyYz
  266.                     WebSite: www.necro-zone.com | www.rss-ro.com
  267.  
  268. ********************************************************************************
  269. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement