Advertisement
Guest User

Untitled

a guest
Dec 24th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. case 9:
  2. {
  3. if(playerVariables[playerid][pRob] == 1)
  4. {
  5. new randpay = RobPrice[playerid] / 2;
  6. playerVariables[playerid][pMoney] += randpay;
  7. format(szMessage, sizeof(szMessage), "Rob succesfuly. You have got a total of $%d.", RobPrice[playerid]);
  8. SCM(playerid, COLOR_LIGHTGREEN, szMessage);
  9. playerVariables[playerid][pCheckpoint] = 0;
  10. DisablePlayerCheckpoint(playerid);
  11. playerVariables[playerid][pRob] = 0;
  12. RemovePlayerAttachedObject(playerid, 2);
  13. }
  14. else
  15. {
  16. DisablePlayerCheckpoint(playerid);
  17. playerVariables[playerid][pCheckpoint] = 0;
  18. playerVariables[playerid][pRob] = 0;
  19. }
  20. }
  21.  
  22.  
  23.  
  24.  
  25.  
  26. CMD:rob(playerid, params[])
  27. {
  28. if(playerVariables[playerid][pWarrants] == 0)
  29. {
  30. if(playerVariables[playerid][pDonate] == 0)
  31. {
  32. if(playerVariables[playerid][pRobPoints] >= 10)
  33. {
  34. if((InBizz[playerid] >= 1) && (GetPlayerVirtualWorld(playerid) - BUSINESS_VIRTUAL_WORLD == InBizz[playerid]))
  35. {
  36. if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] != 1)
  37. {
  38. playerVariables[playerid][pRobPoints] -= 10;
  39. RobTime[playerid] = 11;
  40. SCM(playerid, COLOR_LIGHTBLUE, "You are now robbing the business, wait 10 seconds to take the money!");
  41. playerVariables[playerid][pRob] = 1;
  42. TogglePlayerControllable(playerid, 0);
  43. playerVariables[playerid][pFreezeTime] = -1;
  44. playerVariables[playerid][pFreezeType] = 3;
  45. }
  46. }
  47. }
  48. }
  49. else if(playerVariables[playerid][pDonate] == 1)
  50. {
  51. if(playerVariables[playerid][pRobPoints] >= 8)
  52. {
  53. if((InBizz[playerid] >= 1) && (GetPlayerVirtualWorld(playerid) - BUSINESS_VIRTUAL_WORLD == InBizz[playerid]))
  54. {
  55. if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] != 1)
  56. {
  57. playerVariables[playerid][pRobPoints] -= 8;
  58. RobTime[playerid] = 11;
  59. SCM(playerid, COLOR_LIGHTBLUE, "You are now robbing the business, wait 10 seconds to take the money!");
  60. playerVariables[playerid][pRob] = 1;
  61. TogglePlayerControllable(playerid, 0);
  62. playerVariables[playerid][pFreezeTime] = -1;
  63. playerVariables[playerid][pFreezeType] = 3;
  64. }
  65. }
  66. }
  67. }
  68. else SendClientMessage(playerid, COLOR_GREY, "You don't have enough rob points.");
  69. }
  70. else SendClientMessage(playerid, COLOR_GREY, "You can't rob the bank because you are a wanted player.");
  71. return 1;
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement