Joker_Tricker

Making a New VIP Command using ladmin

Sep 14th, 2011
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. Making Command/Function only for VIP Members:
  2.  
  3. 1. Add in top of your Script:
  4. pawn Code:
  5. #include <ladmin>
  6.  
  7. 2. Go to your Command or Function (In Exemple, I used a command):
  8. pawn Code:
  9. if(strcmp(cmd, "/healme", true) == 0)
  10. {
  11. SetPlayerHealth(playerid, 100);
  12. return 1;
  13. }
  14.  
  15. 3. Add the function that will check if the Player is Vip:
  16. pawn Code:
  17. If(IsPlayerVipMember(playerid))
  18. It will look like this:
  19. pawn Code:
  20. if(strcmp(cmd, "/healme", true) == 0)
  21. {
  22. if(IsPlayerVipMember(playerid))
  23. {
  24. SetPlayerHealth(playerid, 100);
  25. }
  26. else SendClientMessage(playerid, COLOR_WHITE, "ERROR: You not is a Vip Member!");
  27. return 1;
  28. }
  29.  
  30. 4. Done!
  31.  
  32. Making Command/Function only for specified VIP Account (Silver,Gold,Premium):
  33.  
  34. 1. Add in top of your Script:
  35. pawn Code:
  36. #include <ladmin>
  37.  
  38. 2. Go to your Command or Function (In Exemple, I used a command):
  39. pawn Code:
  40. if(strcmp(cmd, "/healme", true) == 0)
  41. {
  42. SetPlayerHealth(playerid, 100);
  43. return 1;
  44. }
  45.  
  46. 3. Add the function that will check if the Player is Vip (Specified Type):
  47. pawn Code:
  48. If(IsPlayerVipType(playerid,TYPE))
  49. //Types:
  50. //1 - Silver Account
  51. //2 - Gold Account
  52. //3 - Premium Account
  53.  
  54. It will look like this (In Exemple, I used for Only Gold(and Silver) Account:
  55. pawn Code:
  56. if(strcmp(cmd, "/healme", true) == 0)
  57. {
  58. if(IsPlayerVipType(playerid,2))
  59. {
  60. SetPlayerHealth(playerid, 100);
  61. }
  62. else SendClientMessage(playerid, COLOR_WHITE, "ERROR: You not is a Silver or Gold Member!");
  63. return 1;
  64. }
  65.  
  66. 4. Done!
  67.  
  68.  
  69. Make command for only administrators level 4 use:
  70. pawn Code:
  71. if (IsPlayerLuxAdm(playerid, 4))
  72.  
  73. Exemple:
  74. pawn Code:
  75. if(strcmp(cmd, "/help", true) == 0)
  76. {
  77. if(IsPlayerLuxAdminLevel(playerid,4))
  78. {
  79. //Function Here
  80. }
  81. else SendClientMessage(playerid, COLOR_WHITE, "ERROR: You not is Administrator Level 4");
  82. return 1;
  83. }
Add Comment
Please, Sign In to add comment