Advertisement
Guest User

pin

a guest
Jan 19th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.34 KB | None | 0 0
  1. CMD:pininfo(playerid, params[])
  2. {
  3. new szDialog[1024];
  4. strcat(szDialog, "Codul PIN este un cod de securitate folosit pentru a iti oferi acces la comenzile de transfer al banilor. Comenzi utie:\n\n");
  5. strcat(szDialog, "* /addpin - Deschide panoul cu taste si permite introducerea unui cod PIN de 4 cifre.\n");
  6. strcat(szDialog, "* /changepin - Deschide panoul cu taste si permite schimbarea codului PIN.\n");
  7. strcat(szDialog, "* /pin - Deschide panoul cu taste si permite deblocarea contului prin introducerea codului PIN.\n");
  8. strcat(szDialog, "* /lockacc - Aceasta comanda permite blocarea contului.\n");
  9. ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Security Code Information:", szDialog, "Close", "");
  10. return 1;
  11. }
  12.  
  13. CMD:pin(playerid, params[])
  14. {
  15. if(PinStep[playerid] != 0) return 1;
  16. if(PlayerInfo[playerid][pPinLogged] == 1) return SendClientMessage(playerid, -1, "{FFFFCC}Eroare: Contul tau este deja deblocat.");
  17. if(strlen(PlayerInfo[playerid][pPin]) == 1) return SendClientMessage(playerid, -1, "{FFFFCC}Eroare: Trebuie sa adaugi un cod de securitate mai intai. Foloseste /addpin.");
  18. SendClientMessage(playerid, -1, "{FFFF45}Introdu codul tau de securitate si apasa butonul verde.");
  19. PinStep[playerid] = 1;
  20. ShowPinTextDraws(playerid);
  21. format(InputtText[playerid], 10, "");
  22. SelectTextDraw(playerid, COLOR_WHITE);
  23. return 1;
  24. }
  25.  
  26. CMD:addpin(playerid, params[]) {
  27. if(PinStep[playerid] != 0) return 1;
  28. if(strlen(PlayerInfo[playerid][pPin]) != 1) return SendClientMessage(playerid, -1, "{FFFFCC}Eroare: Deja ai un cod de securitate setat.");
  29. SendClientMessage(playerid, -1, "{FFFF45}Introdu un cod de securitate de 4 cifre si apasa butonul verde.");
  30. PinStep[playerid] = 1;
  31. ShowPinTextDraws(playerid);
  32. format(InputtText[playerid], 10, "");
  33. SelectTextDraw(playerid, COLOR_WHITE);
  34. return 1;
  35. }
  36.  
  37. CMD:lockacc(playerid, params[]) {
  38. SendClientMessage(playerid, -1, "{FFFF45}Contul tau a fost blocat. Foloseste /pin pentru a il debloca.");
  39. PlayerInfo[playerid][pPinLogged] = 0;
  40. PinStep[playerid] = 0;
  41. return 1;
  42. }
  43.  
  44. CMD:changepin(playerid, params[]) {
  45. if(strlen(PlayerInfo[playerid][pPin]) == 1) SendClientMessage(playerid, -1, "{FFFFCC}Eroare: Trebuie sa adaugi un cod de securitate mai intai. Foloseste /addpin.");
  46. SendClientMessage(playerid, -1, "{FFFF45}Introdu codul tau PIN pentru a te autentifica.");
  47. PinStep[playerid] = 2;
  48. ShowPinTextDraws(playerid);
  49. format(InputtText[playerid], 10, "");
  50. SelectTextDraw(playerid, COLOR_WHITE);
  51. return 1;
  52. }
  53.  
  54. function HidePinTextDraws(playerid) {
  55. TextDrawHideForPlayer(playerid, PinTDs[0]); TextDrawHideForPlayer(playerid, PinTDs[1]); TextDrawHideForPlayer(playerid, PinTDs[2]); TextDrawHideForPlayer(playerid, PinTDs[3]);
  56. TextDrawHideForPlayer(playerid, PinTDs[4]); TextDrawHideForPlayer(playerid, PinTDs[5]); TextDrawHideForPlayer(playerid, PinTDs[6]); TextDrawHideForPlayer(playerid, PinTDs[7]);
  57. TextDrawHideForPlayer(playerid, PinTDs[8]); TextDrawHideForPlayer(playerid, PinTDs[9]); TextDrawHideForPlayer(playerid, PinTDs[10]); TextDrawHideForPlayer(playerid, PinTDs[11]);
  58. TextDrawHideForPlayer(playerid, PinTDs[12]); TextDrawHideForPlayer(playerid, PinTDs[13]);
  59.  
  60. PlayerTextDrawHide(playerid, GreenButton); PlayerTextDrawHide(playerid, RedButton);
  61.  
  62. PlayerTextDrawHide(playerid, PinNumber[0]); PlayerTextDrawHide(playerid, PinNumber[1]); PlayerTextDrawHide(playerid, PinNumber[2]); PlayerTextDrawHide(playerid, PinNumber[3]);
  63. PlayerTextDrawHide(playerid, PinNumber[4]); PlayerTextDrawHide(playerid, PinNumber[5]); PlayerTextDrawHide(playerid, PinNumber[6]); PlayerTextDrawHide(playerid, PinNumber[7]);
  64. PlayerTextDrawHide(playerid, PinNumber[8]); PlayerTextDrawHide(playerid, PinNumber[9]);
  65.  
  66. PlayerTextDrawHide(playerid, PinResult);
  67. PlayerTextDrawSetString(playerid, PinResult, "");
  68. return 1;
  69. }
  70.  
  71. function ShowPinTextDraws(playerid) {
  72. TextDrawShowForPlayer(playerid, PinTDs[0]); TextDrawShowForPlayer(playerid, PinTDs[1]); TextDrawShowForPlayer(playerid, PinTDs[2]); TextDrawShowForPlayer(playerid, PinTDs[3]);
  73. TextDrawShowForPlayer(playerid, PinTDs[4]); TextDrawShowForPlayer(playerid, PinTDs[5]); TextDrawShowForPlayer(playerid, PinTDs[6]); TextDrawShowForPlayer(playerid, PinTDs[7]);
  74. TextDrawShowForPlayer(playerid, PinTDs[8]); TextDrawShowForPlayer(playerid, PinTDs[9]); TextDrawShowForPlayer(playerid, PinTDs[10]); TextDrawShowForPlayer(playerid, PinTDs[11]);
  75. TextDrawShowForPlayer(playerid, PinTDs[12]); TextDrawShowForPlayer(playerid, PinTDs[13]);
  76.  
  77. PlayerTextDrawShow(playerid, GreenButton); PlayerTextDrawShow(playerid, RedButton);
  78.  
  79. PlayerTextDrawShow(playerid, PinNumber[0]); PlayerTextDrawShow(playerid, PinNumber[1]); PlayerTextDrawShow(playerid, PinNumber[2]); PlayerTextDrawShow(playerid, PinNumber[3]);
  80. PlayerTextDrawShow(playerid, PinNumber[4]); PlayerTextDrawShow(playerid, PinNumber[5]); PlayerTextDrawShow(playerid, PinNumber[6]); PlayerTextDrawShow(playerid, PinNumber[7]);
  81. PlayerTextDrawShow(playerid, PinNumber[8]); PlayerTextDrawShow(playerid, PinNumber[9]);
  82.  
  83. PlayerTextDrawShow(playerid, PinResult);
  84. return 1;
  85. }
  86.  
  87. function UpdatePinResult(playerid) {
  88. if(strlen(InputtText[playerid]) == 1) PlayerTextDrawSetString(playerid, PinResult, "[]");
  89. else if(strlen(InputtText[playerid]) == 2) PlayerTextDrawSetString(playerid, PinResult, "[[]]");
  90. else if(strlen(InputtText[playerid]) == 3) PlayerTextDrawSetString(playerid, PinResult, "[[[]]]");
  91. else if(strlen(InputtText[playerid]) == 4) PlayerTextDrawSetString(playerid, PinResult, "[[[[]]]]");
  92. return 1;
  93. }
  94.  
  95. public OnPropTextdrawUpdate(update, h)
  96. {
  97. new PropertyString[256];
  98. if(update == 1)
  99. {
  100. if(HouseInfo[h][hOwned] == 0)
  101. {
  102. DestroyDynamic3DTextLabel(HouseLabel[h]);
  103. DestroyDynamicPickup(HouseInfo[h][hPickupID]);
  104. HouseInfo[h][hPickupID] = CreateDynamicPickup(1273, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
  105. format(PropertyString, sizeof(PropertyString),"{FFFFFF}Casa {54CC56}%d \n{FFFFFF}Aceasta casa este de vanzare\nDescription: {54CC56}%s \n{FFFFFF}Valoare: {54CC56}$%s \n{FFFFFF}Nivel: {54CC56}%d \n{FFFFFF}Pentru a cumpara aceasta casa, tasteaza {54CC56}/buyhouse",h,HouseInfo[h][hDiscription],FormatNumber(HouseInfo[h][hValue]),HouseInfo[h][hLevel]);
  106. HouseLabel[h] = CreateDynamic3DTextLabel(PropertyString ,0x09FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
  107. }
  108. else if(HouseInfo[h][hOwned] == 1)
  109. {
  110. if(HouseInfo[h][hRentabil] == 1)
  111. {
  112. DestroyDynamic3DTextLabel(HouseLabel[h]);
  113. format(PropertyString, sizeof(PropertyString),"{54CC56}%s{FFFFFF}\nCasa {54CC56}%d \n{FFFFFF}Casa detinuta de: {54CC56}%s \n{FFFFFF}Chirie: {54CC56}$%s \n{FFFFFF}Nivel: {54CC56}%d \n{FFFFFF}Pentru a lua chirie la aceasta casa, tasteaza {54CC56}/rentroom",HouseInfo[h][hDiscription],h,HouseInfo[h][hOwner],FormatNumber(HouseInfo[h][hRent]),HouseInfo[h][hLevel]);
  114. HouseLabel[h] = CreateDynamic3DTextLabel(PropertyString ,0x09FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
  115. }
  116. else
  117. {
  118. DestroyDynamic3DTextLabel(HouseLabel[h]);
  119. format(PropertyString, sizeof(PropertyString),"{54CC56}%s{FFFFFF}\nCasa {54CC56}%d \n{FFFFFF}Casa detinuta de: {54CC56}%s \n{FFFFFF}Nivel: {54CC56}%d",HouseInfo[h][hDiscription],h,HouseInfo[h][hOwner], HouseInfo[h][hLevel]);
  120. HouseLabel[h] = CreateDynamic3DTextLabel(PropertyString ,0x09FF00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
  121. }
  122. DestroyDynamicPickup(HouseInfo[h][hPickupID]);
  123. HouseInfo[h][hPickupID] = CreateDynamicPickup(1272, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
  124. }
  125. }
  126. else if(update == 2)
  127. {
  128. if(BizzInfo[h][bOwned] == 0)
  129. {
  130. DestroyDynamic3DTextLabel(BizzLabel[h]);
  131. format(PropertyString, sizeof(PropertyString),"{FFFFFF}Afacere {1569C7}%d \n%s{FFFFFF} \n{FFFFFF}Aceasta afacere este de vanzare \n {FFFFFF}Valoare: {1569C7}%s \n{FFFFFF}Nivel: {1569C7}%d \n{FFFFFF}Pentru a cumpara aceasta afacere, tasteaza {1569C7}/buybiz",h,BizzInfo[h][bMessage],FormatNumber(BizzInfo[h][bBuyPrice]),BizzInfo[h][bLevelNeeded]);
  132. BizzLabel[h] = CreateDynamic3DTextLabel(PropertyString ,0x0066FFFF,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
  133. }
  134. else if(BizzInfo[h][bOwned] == 1)
  135. {
  136. DestroyDynamic3DTextLabel(BizzLabel[h]);
  137. format(PropertyString, sizeof(PropertyString),"{FFFFFF}Afacere {1569C7}%d \n%s{FFFFFF} \n{FFFFFF}This Afacere is owned by {1569C7}%s \n{FFFFFF}Taxa de intrare: {1569C7}$%s\n{FFFFFF}Nivel:{1569C7} %d",h,BizzInfo[h][bMessage],BizzInfo[h][bOwner],FormatNumber(BizzInfo[h][bEntranceCost]),BizzInfo[h][bLevelNeeded]);
  138. BizzLabel[h] = CreateDynamic3DTextLabel(PropertyString ,0x0066FFFF,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
  139. }
  140. }
  141. else if(update == 3)
  142. {
  143. if(SBizzInfo[h][sbOwned] == 0)
  144. {
  145. DestroyDynamic3DTextLabel(SBizzLabel[h]);
  146. format(PropertyString, sizeof(PropertyString),"{FFFFFF}Afacere {1569C7}%d \n%s{FFFFFF} \n{FFFFFF}Aceasta afacere este de vanzare \n{FFFFFF}Valoare:{1569C7} $%s \n{FFFFFF}Nivel:{1569C7} %d \n{FFFFFF}Pentru a cumpara aceasta afacere, tasteaza {1569C7}/buybiz",h,SBizzInfo[h][sbMessage],FormatNumber(SBizzInfo[h][sbBuyPrice]),SBizzInfo[h][sbLevelNeeded]);
  147. SBizzLabel[h] = CreateDynamic3DTextLabel(PropertyString ,0x0066FFFF,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
  148. }
  149. else if(SBizzInfo[h][sbOwned] == 1)
  150. {
  151. DestroyDynamic3DTextLabel(SBizzLabel[h]);
  152. format(PropertyString, sizeof(PropertyString),"{FFFFFF}Afacere {1569C7}%d \n%s{FFFFFF} \n{FFFFFF}This Afacere is owned by {1569C7}%s\n{FFFFFF}Taxa:{1569C7} $%s\n{FFFFFF}Nivel:{1569C7} %d",h,SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],FormatNumber(SBizzInfo[h][sbEntranceCost]),SBizzInfo[h][sbLevelNeeded]);
  153. SBizzLabel[h] = CreateDynamic3DTextLabel(PropertyString ,0x0066FFFF,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
  154. }
  155. }
  156. return 1;
  157. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement