Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmd:duty(playerid, params[]) {
- if(IsPlayerLogged[playerid] == 0) return 1;
- if(PlayerInfo[playerid][pGunLic] == 0) return SendClientMessage(playerid, COLOR_GREY, "Nu ai licenta de arme.");
- 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.");
- new house = PlayerInfo[playerid][pHouse],string[200];
- 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), "* Ofiter %s a luat o insinga si un pistol din dulapul lui.", GetName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerWeaponEx(playerid, 24, 500);
- GivePlayerWeaponEx(playerid, 3, 0);
- 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), "* Ofiter %s a luat o insinga si un pistol din dulapul lui.", GetName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerWeaponEx(playerid, 24, 500);
- GivePlayerWeaponEx(playerid, 29, 3000);
- GivePlayerWeaponEx(playerid, 41, 500);
- 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), "* Ofiter %s a luat o insinga si un pistol din dulapul lui.", GetName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerWeaponEx(playerid, 24, 500);
- GivePlayerWeaponEx(playerid, 31, 3000);
- GivePlayerWeaponEx(playerid, 31, 1000);
- SetPlayerArmourEx(playerid, 100);
- SetPlayerHealthEx(playerid, 100);
- OnDuty[playerid] = 1;
- }
- if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15) {
- format(string, sizeof(string), "* Ofiter %s a luat o insinga si un pistol din dulapul lui.", GetName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerWeaponEx(playerid, 24, 500);
- GivePlayerWeaponEx(playerid, 29, 3000);
- GivePlayerWeaponEx(playerid, 41, 500);
- GivePlayerWeaponEx(playerid, 31, 1000);
- SetPlayerArmourEx(playerid, 100);
- SetPlayerHealthEx(playerid, 100);
- OnDuty[playerid] = 1;
- }
- if(PlayerInfo[playerid][pMember] == 25 || PlayerInfo[playerid][pLeader] == 25) {
- format(string, sizeof(string), "* Ofiter %s a luat o insinga si un pistol din dulapul lui.", GetName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerWeaponEx(playerid, 24, 500);
- GivePlayerWeaponEx(playerid, 29, 3000);
- GivePlayerWeaponEx(playerid, 41, 500);
- GivePlayerWeaponEx(playerid, 31, 1000);
- SetPlayerArmourEx(playerid, 100);
- SetPlayerHealthEx(playerid, 100);
- OnDuty[playerid] = 1;
- }
- SetPlayerSkinEx(playerid, PlayerInfo[playerid][pChar]);
- }
- else if(OnDuty[playerid]==1) {
- format(string, sizeof(string), "* Ofiter %s a plasat insinga si nu mai este la datorie.", GetName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- OnDuty[playerid] = 0;
- SetPlayerArmourEx(playerid, 0);
- SetPlayerSkinEx(playerid, 250);
- }
- SetPlayerToTeamColor(playerid);
- }
- else return SCM(playerid, COLOR_GREY, "Nu esti in zona corecta.");
- }
- else return SCM(playerid, COLOR_GREY, "Nu esti in zona corecta.");
- }
- else SCM(playerid,COLOR_BZWHITE,"Eroare: Nu faci parte dintr-un departament.");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement