Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:duty(playerid, params[])
- {
- if(PinLogged[playerid] == 0)return SCM(playerid, COLOR_DARKNICERED,"{FFFFFF}{FFFFFF}Contul tau este {ff0000}blocat{ffffff}, foloseste {ff0000}/pin{ffffff} pentru a-l debloca..");
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pGunLic] == 0) return SendClientMessage(playerid, COLOR_WHITE,"{FFB870}You don't have gun license.");
- new house = PlayerInfo[playerid][pPhousekey],string[200],sendername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(IsACop(playerid))
- {
- 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))
- {
- if(GetPlayerInterior(playerid) != 0)
- {
- if(OnDuty[playerid] == 0)
- {
- if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
- {
- format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerWeaponEx(playerid, 24, 500);
- GivePlayerWeaponEx(playerid, 3, 1);
- GivePlayerWeaponEx(playerid, 41, 500);
- GivePlayerWeaponEx(playerid, 29, 1000);
- GivePlayerWeaponEx(playerid, 31, 1000);
- SetPlayerArmourEx(playerid, 100);
- SetPlayerHealthEx(playerid, 100);
- OnDuty[playerid] = 1;
- }
- if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
- {
- format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerWeaponEx(playerid, 24, 500);
- GivePlayerWeaponEx(playerid, 3, 1);
- GivePlayerWeaponEx(playerid, 41, 500);
- GivePlayerWeaponEx(playerid, 29, 1000);
- GivePlayerWeaponEx(playerid, 31, 1000);
- SetPlayerArmourEx(playerid, 100);
- SetPlayerHealthEx(playerid, 100);
- OnDuty[playerid] = 1;
- }
- if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
- {
- format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerWeaponEx(playerid, 24, 500);
- GivePlayerWeaponEx(playerid, 41, 500);
- GivePlayerWeaponEx(playerid, 29, 1000);
- GivePlayerWeaponEx(playerid, 31, 1000);
- SetPlayerArmourEx(playerid, 100);
- SetPlayerHealthEx(playerid, 100);
- OnDuty[playerid] = 1;
- }
- if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
- {
- format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerWeaponEx(playerid, 24, 500);
- GivePlayerWeaponEx(playerid, 3, 1);
- GivePlayerWeaponEx(playerid, 41, 500);
- GivePlayerWeaponEx(playerid, 29, 1000);
- GivePlayerWeaponEx(playerid, 31, 1000);
- SetPlayerArmourEx(playerid, 100);
- SetPlayerHealthEx(playerid, 100);
- OnDuty[playerid] = 1;
- }
- }
- else if(OnDuty[playerid]==1)
- {
- format(string, sizeof(string), "* Officer %s places his Badge and Gun in his locker.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- OnDuty[playerid] = 0;
- SetPlayerArmourEx(playerid, 0);
- ResetPlayerWeaponsEx(playerid);
- ResetPlayerWeapons(playerid);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You are not in a locker room/your house.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You are not in a locker room/your house.");
- return 1;
- }
- }
- else if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLocal] == house)
- {
- if(IsPlayerInRangeOfPoint(playerid, 50.0, 1494.7902,1306.6029,1093.2947))
- {
- if(PlayerInfo[playerid][pMember] != 14) return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not a medic.");
- if(OnDutymedic[playerid] == 0)
- {
- format(string, sizeof(string), "* Medic %s took a Health Kit and a Fire Extinguisher from his locker.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerWeaponEx(playerid, 42, 1000);
- OnDutymedic[playerid] = 1;
- }
- else if(OnDutymedic[playerid] > 0)
- {
- format(string, sizeof(string), "* Medic %s places his Health Kit and Fire Extinguisher in his locker.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- OnDutymedic[playerid] = 0;
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement