Guest User

Biz problem

a guest
May 5th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(strcmp(cmd, "/open", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. for(new i = 0; i < sizeof(BizzInfo); i++)
  6. {
  7. if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]) || PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
  8. {
  9. if(PlayerInfo[playerid][pPbiskey] == i)
  10. {
  11. if(BizzInfo[i][bLocked] == 1)
  12. {
  13. BizzInfo[i][bLocked] = 0;
  14. GameTextForPlayer(playerid, "~w~Biznis ~g~Otvoren", 5000, 6);
  15. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  16. return 1;
  17. }
  18. if(BizzInfo[i][bLocked] == 0)
  19. {
  20. BizzInfo[i][bLocked] = 1;
  21. GameTextForPlayer(playerid, "~w~Biznis ~r~Zatvoren", 5000, 6);
  22. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  23. return 1;
  24. }
  25. }
  26. else
  27. {
  28. GameTextForPlayer(playerid, "~r~Nemate Kljuc", 5000, 6);
  29. return 1;
  30. }
  31. }
  32. }
  33. for(new i = 0; i < sizeof(SBizzInfo); i++)
  34. {
  35. if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
  36. {
  37. if(PlayerInfo[playerid][pPbiskey] == i+100)
  38. {
  39. if(SBizzInfo[i][sbLocked] == 1)
  40. {
  41. SBizzInfo[i][sbLocked] = 0;
  42. GameTextForPlayer(playerid, "~w~Biznis ~g~Otvoren", 5000, 6);
  43. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  44. return 1;
  45. }
  46. if(SBizzInfo[i][sbLocked] == 0)
  47. {
  48. SBizzInfo[i][sbLocked] = 1;
  49. GameTextForPlayer(playerid, "~w~Biznis ~r~Zatvoren", 5000, 6);
  50. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  51. return 1;
  52. }
  53. }
  54. else
  55. {
  56. GameTextForPlayer(playerid, "~r~Nemate Kljuc", 5000, 6);
  57. return 1;
  58. }
  59. }
  60. }
  61. }
  62. return 1;
  63. }
Advertisement
Add Comment
Please, Sign In to add comment