Guest User

Untitled

a guest
Apr 24th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.93 KB | None | 0 0
  1. if(strcmp(cmd, "/makeleader", true) == 0)
  2. {
  3. tmp = strtok(cmdtext, idx);
  4. if(!strlen(tmp))
  5. {
  6. SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /makeleader [Playerid/DioImena] [Number(1-10)]");
  7. return 1;
  8. }
  9. new para1;
  10. new level;
  11. para1 = ReturnUser(tmp);
  12. tmp = strtok(cmdtext, idx);
  13. level = strvalEx(tmp);
  14. if(level > 17 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Nemoj ici ispod 0, ili iznad broja 17!"); return 1; }
  15. if (PlayerInfo[playerid][pAdmin] >= 1337)
  16. {
  17. if(IsPlayerConnected(para1))
  18. {
  19. if(para1 != INVALID_PLAYER_ID)
  20. {
  21. if(PlayerInfo[para1][pMember] > 0)
  22. {
  23. SendClientMessage(playerid, COLOR_GREY, "Taj igrac je u organizaciji!");
  24. return 1;
  25. }
  26. GetPlayerName(para1, giveplayer, sizeof(giveplayer));
  27. GetPlayerName(playerid, sendername, sizeof(sendername));
  28. PlayerInfo[para1][pLeader] = level;
  29. format(string, sizeof(string), " Dobio si kontrolu nad zatrazenom organizacijom od strane Admina %s", sendername);
  30. SendClientMessage(para1, COLOR_LIGHTBLUE, string);
  31. format(string, sizeof(string), " Dao si %s kontrolu da vodi organizaciju broj %d.", giveplayer,level);
  32. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  33. if(level == 0) { PlayerInfo[para1][pChar] = 0; }
  34. else if(level == 1) { PlayerInfo[para1][pChar] = 288; PlayerInfo[para1][pTeam] = 2; PlayerInfo[para1][pRank] = 10; gTeam[para1] = 2;} //Police Force
  35. else if(level == 2) { PlayerInfo[para1][pChar] = 286; PlayerInfo[para1][pTeam] = 2; PlayerInfo[para1][pRank] = 6; gTeam[para1] = 2;} //FBI/ATF
  36. else if(level == 4) { PlayerInfo[para1][pChar] = 295; PlayerInfo[para1][pTeam] = 1; PlayerInfo[para1][pRank] = 6; gTeam[para1] = 1;} //EMS / Vatrogasci skin lider
  37. else if(level == 5) { PlayerInfo[para1][pChar] = 115; } //East Side Locos
  38. else if(level == 6) { PlayerInfo[para1][pChar] = 113; } //Sicilian
  39. else if(level == 7) { PlayerInfo[para1][pChar] = 147; } //Mayor
  40. else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitmans
  41. else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //News Reporters
  42. else if(level == 11) { PlayerInfo[para1][pChar] = 117; } //Driving/Flying School
  43. else if(level == 14) { PlayerInfo[para1][pChar] = 186; } //Russian mafia
  44. else if(level == 15) { PlayerInfo[para1][pChar] = 270; } //Grove Street
  45. else if(level == 16) { PlayerInfo[para1][pChar] = 240; } //Street racers
  46. else if(level == 17) { PlayerInfo[para1][pChar] = 19; } //CBB
  47. gTeam[para1] = 17;
  48. PlayerInfo[para1][pTeam] = 17;
  49. if(PlayerInfo[para1][pChar] == 0) { SetPlayerSkin(para1, 299); }
  50. else { SetPlayerSkin(para1, PlayerInfo[para1][pChar]); }
  51. }
  52. }
  53. }
  54. else
  55. SendClientMessage(playerid, COLOR_RED, " Niste ovlasteni za koristenje ove komande!");
  56. return 1;
  57. }
  58.  
  59.  
  60.  
  61.  
  62. //======================================================================
  63. if(strcmp(cmd, "/lockfcar", true) == 0)
  64. {
  65. if (PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
  66. {
  67. for(new c = 0; c < sizeof(CarInfo); c++)
  68. {
  69. new Float:x,Float:y,Float:z;
  70. new carid = CarInfo[c][cID];
  71. GetVehiclePos(carid, x, y, z);
  72. GetPlayerName(playerid, sendername, sizeof(sendername));
  73.  
  74. if(IsPlayerInRangeOfPoint(playerid,3, x, y, z))
  75. {
  76. if(PlayerInfo[playerid][pMember] == CarInfo[c][cFaction] || PlayerInfo[playerid][pLeader] == CarInfo[c][cFaction])
  77. {
  78. if (CarInfo[c][cUsage] == CAR_USAGE_FACTION)
  79. {
  80. if(CarInfo[c][cLock] == 0)
  81. {
  82. foreach(Player, i)
  83. {
  84. LockCar(CarInfo[c][cID]);
  85. }
  86. GameTextForPlayer(playerid, "~w~Auto organizacije~n~~r~zakljucan", 10000, 6);
  87. CarInfo[c][cLock] = 1;
  88. format(string, sizeof(string), "* %s zakljucava automobil.", sendername);
  89. ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  90. return 1;
  91. }
  92. else if(CarInfo[c][cLock] == 1)
  93. {
  94. foreach(Player, i)
  95. {
  96. UnLockCar(CarInfo[c][cID]);
  97. }
  98. GameTextForPlayer(playerid, "~w~Auto organizacije~n~~g~otkljucan", 10000, 6);
  99. CarInfo[c][cLock] = 0;
  100. format(string, sizeof(string), "* %s otkljucava automobil.", sendername);
  101. ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  102. return 1;
  103. }
  104. }
  105. }
  106. else
  107. {
  108. SendClientMessage(playerid, COLOR_RED, "Nemozete kljucati auto druge organizacije.");
  109. return 1;
  110. }
  111. }
  112. }
  113. }
  114. else
  115. {
  116. SendClientMessage(playerid, COLOR_RED, "Niste clan organizacije.");
  117. return 1;
  118. }
  119. return 1;
  120. }
Advertisement
Add Comment
Please, Sign In to add comment