Advertisement
Xaviour212

Ulric Barber System

Apr 3rd, 2011
2,555
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.02 KB | None | 0 0
  1. /* Ulric Hair System by Xaviour212
  2.     Now you can change your skin hair.
  3.     Sorry if the hair is not solid because it used the coordinates of the head of Carl Johnson. */
  4.    
  5. #include <a_samp>
  6. #include <sscanf>
  7.  
  8. #define blue        0x00C2ECFF
  9. #define green 0x45E01FFF
  10.  
  11. #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  12.  
  13. public OnFilterScriptInit()
  14. {
  15.     print("\n==========================================");
  16.     print(" Ulric Hair System by Xaviour212.");
  17.     print("==========================================\n");
  18.     return 1;
  19. }
  20.  
  21. public OnPlayerCommandText(playerid, cmdtext[])
  22. {
  23.     dcmd(hairhelp,8,cmdtext);
  24.     dcmd(hair,4,cmdtext);
  25.     dcmd(default,7,cmdtext);
  26.     return 0;
  27. }
  28.  
  29. dcmd_hairhelp(playerid, params[])
  30. {
  31.     SendClientMessage(playerid, blue, "Ulric Hair System by Xaviour212/Dimas_Rizward");
  32.     SendClientMessage(playerid, green, "Use /hair to change a your character hair. ");
  33.     SendClientMessage(playerid, green, "Use /default to use default hair.");
  34.     SendClientMessage(playerid, green, "You must in barber to change your hair.");
  35.     return 1;
  36. }
  37.  
  38. dcmd_hair(playerid, params[])
  39. {
  40.     new hair;
  41.     if(IsPlayerInRangeOfPoint(playerid, 20, 421.4878, -78.2720, 1001.8047))
  42.     {
  43.         if(sscanf(params,"i", hair))return SendClientMessage(playerid, 0xFF0000AA, "[ERROR]Usage: /hair [1 - 5]");
  44.         if(hair > 5)return SendClientMessage(playerid,0xFF0000AA,"Only 5 available Hair.");
  45.         if(hair == 1)
  46.         {
  47.             if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
  48.             SetPlayerAttachedObject( playerid, 3, 18640, 2, 0.081841, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
  49.             SendClientMessage(playerid,green, "You character hair now is Afro");
  50.             GivePlayerMoney(playerid, -200);
  51.         }
  52.         if(hair == 2)
  53.         {
  54.             if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
  55.             SetPlayerAttachedObject( playerid, 3, 18975, 2, 0.128191, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
  56.             SendClientMessage(playerid,green, "You character hair now is Afro 2");
  57.             GivePlayerMoney(playerid, -210);
  58.         }
  59.         if(hair == 3)
  60.         {
  61.             if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
  62.             SetPlayerAttachedObject( playerid, 3, 19077, 2, 0.124588, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
  63.             SendClientMessage(playerid,green, "You character hair now is Police Hair");
  64.             GivePlayerMoney(playerid, -250);
  65.         }
  66.         if(hair == 4)
  67.         {
  68.             if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
  69.             SetPlayerAttachedObject( playerid, 3, 19136, 2, 0.141113, 0.006911, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
  70.             SendClientMessage(playerid,green, "You character hair now is Rockstar Hair");
  71.             GivePlayerMoney(playerid, -350);
  72.         }
  73.         if(hair == 5)
  74.         {
  75.             if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
  76.             SetPlayerAttachedObject( playerid, 3, 19274, 2, 0.099879, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
  77.             SendClientMessage(playerid,green, "You character hair now is Clown Hair");
  78.             GivePlayerMoney(playerid, -150);
  79.         }
  80.     }
  81.     return SendClientMessage(playerid, 0xFF0000AA, "[ERROR]You must in barber to use this command");
  82. }
  83.  
  84. dcmd_default(playerid, params[])
  85. {
  86.     if(IsPlayerInRangeOfPoint(playerid, 20, 421.4878, -78.2720, 1001.8047)) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR]You must in barber to use this command");
  87.     if(IsPlayerAttachedObjectSlotUsed(playerid,3)) RemovePlayerAttachedObject(playerid,3);
  88.     SendClientMessage(playerid, green, "You use a default hair.");
  89.     GivePlayerMoney(playerid, -50);
  90.     return 1;
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement