Advertisement
Guest User

/duty

a guest
Apr 27th, 2020
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.53 KB | None | 0 0
  1. cmd:duty(playerid, params[]) {
  2.     if(IsPlayerLogged[playerid] == 0) return 1;
  3.     if(PlayerInfo[playerid][pGunLic] == 0) return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de arme.");
  4.     if(PlayerInfo[playerid][pPinLogged] == 0) return SendClientMessage(playerid,COLOR_BZWHITE,"Eroare: Contul tau este blocat. Scrie /unlockacc sau /pin pentru a il debloca si pentru a folosi aceasta comanda.");
  5.     new house = PlayerInfo[playerid][pHouse],string[200];
  6.     if(IsACop(playerid)) {
  7.         if(PlayerInfo[playerid][pLocal] == house || IsPlayerInRangeOfPoint(playerid, 150.0, 245.8297,112.4436,1003.2188) || IsPlayerInRangeOfPoint(playerid, 150.0, 236.3031,162.9478,1003.0300)) {
  8.             if(GetPlayerInterior(playerid) != 0) {
  9.                 if(OnDuty[playerid] == 0) {
  10.                     if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) {
  11.                         format(string, sizeof(string), "* Ofiter %s a luat o insinga si un pistol din dulapul lui.", GetName(playerid));
  12.                         ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  13.                         GivePlayerWeaponEx(playerid, 24, 500);
  14.                         GivePlayerWeaponEx(playerid, 3, 0);
  15.                         GivePlayerWeaponEx(playerid, 41, 500);
  16.                         GivePlayerWeaponEx(playerid, 29, 1000);
  17.                         GivePlayerWeaponEx(playerid, 31, 1000);
  18.                         SetPlayerArmourEx(playerid, 100);
  19.                         SetPlayerHealthEx(playerid, 100);
  20.                         OnDuty[playerid] = 1;
  21.                     }
  22.                     if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) {
  23.                         format(string, sizeof(string), "* Ofiter %s a luat o insinga si un pistol din dulapul lui.", GetName(playerid));
  24.                         ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  25.                         GivePlayerWeaponEx(playerid, 24, 500);
  26.                         GivePlayerWeaponEx(playerid, 29, 3000);
  27.                         GivePlayerWeaponEx(playerid, 41, 500);
  28.                         GivePlayerWeaponEx(playerid, 31, 1000);
  29.                         SetPlayerArmourEx(playerid, 100);
  30.                         SetPlayerHealthEx(playerid, 100);
  31.                         OnDuty[playerid] = 1;
  32.                     }
  33.                     if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) {
  34.                         format(string, sizeof(string), "* Ofiter %s a luat o insinga si un pistol din dulapul lui.", GetName(playerid));
  35.                         ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  36.                         GivePlayerWeaponEx(playerid, 24, 500);
  37.                         GivePlayerWeaponEx(playerid, 31, 3000);
  38.                         GivePlayerWeaponEx(playerid, 31, 1000);
  39.                         SetPlayerArmourEx(playerid, 100);
  40.                         SetPlayerHealthEx(playerid, 100);
  41.                         OnDuty[playerid] = 1;
  42.                     }
  43.                     if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15) {
  44.                         format(string, sizeof(string), "* Ofiter %s a luat o insinga si un pistol din dulapul lui.", GetName(playerid));
  45.                         ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  46.                         GivePlayerWeaponEx(playerid, 24, 500);
  47.                         GivePlayerWeaponEx(playerid, 29, 3000);
  48.                         GivePlayerWeaponEx(playerid, 41, 500);
  49.                         GivePlayerWeaponEx(playerid, 31, 1000);
  50.                         SetPlayerArmourEx(playerid, 100);
  51.                         SetPlayerHealthEx(playerid, 100);
  52.                         OnDuty[playerid] = 1;
  53.                     }
  54.                     if(PlayerInfo[playerid][pMember] == 25 || PlayerInfo[playerid][pLeader] == 25) {
  55.                         format(string, sizeof(string), "* Ofiter %s a luat o insinga si un pistol din dulapul lui.", GetName(playerid));
  56.                         ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  57.                         GivePlayerWeaponEx(playerid, 24, 500);
  58.                         GivePlayerWeaponEx(playerid, 29, 3000);
  59.                         GivePlayerWeaponEx(playerid, 41, 500);
  60.                         GivePlayerWeaponEx(playerid, 31, 1000);
  61.                         SetPlayerArmourEx(playerid, 100);
  62.                         SetPlayerHealthEx(playerid, 100);
  63.                         OnDuty[playerid] = 1;
  64.                     }
  65.                     SetPlayerSkinEx(playerid, PlayerInfo[playerid][pChar]);            
  66.                 }
  67.                 else if(OnDuty[playerid]==1) {
  68.                     format(string, sizeof(string), "* Ofiter %s a plasat insinga si nu mai este la datorie.", GetName(playerid));
  69.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  70.                     OnDuty[playerid] = 0;
  71.                     SetPlayerArmourEx(playerid, 0);
  72.                     SetPlayerSkinEx(playerid, 250);
  73.                 }
  74.                 SetPlayerToTeamColor(playerid);
  75.             }
  76.             else return SCM(playerid, COLOR_GREY, "Nu esti in zona corecta.");
  77.         }
  78.         else return SCM(playerid, COLOR_GREY, "Nu esti in zona corecta.");
  79.     }
  80.     else SCM(playerid,COLOR_BZWHITE,"Eroare: Nu faci parte dintr-un departament.");
  81.     return 1;
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement