Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:mdc(playerid, params[])
- {
- if (!IsPoliceFaction(playerid))
- return SendClientMessage(playerid, COLOR_ADM, "PRISTUP ODBIJEN:{FFFFFF} You aren't authorized to use this.");
- if(!IsPlayerInAnyVehicle(playerid))
- return SendClientMessage(playerid, COLOR_ADM, "SERVER: You aren't in a vehicle.");
- if(GetPlayerVehicleSeat(playerid) > 1)
- return SendClientMessage(playerid, COLOR_ADM, "SERVER: You can't use the MDC from back there.");
- new
- vehicleid = GetPlayerVehicleID(playerid)
- ;
- if(!IsValidFactionCar(vehicleid) || IsValidFactionCar(vehicleid) && !FactionData[FactionCar[vehicleid][carFaction]][factionCopPerms])
- return SendClientMessage(playerid, COLOR_ADM, "SERVER: This vehicle doesn't have a MDC.");
- ShowPlayerMDC(playerid);
- return 1;
- }
- CMD:wanted(playerid, params[])
- {
- if (!IsPoliceFaction(playerid))
- return SendClientMessage(playerid, COLOR_ADM, "PRISTUP ODBIJEN:{FFFFFFF} You aren't authorized to use this.");
- if(!PlayerData[playerid][pLAWduty])
- return SendClientMessage(playerid, COLOR_ADM, "PRISTUP ODBIJEN:{FFFFFFF} You aren't authorized to use this.");
- new
- playerb,
- reason[128],
- add_query[256];
- if(sscanf(params, "us[128]", playerb, reason))
- return SendClientMessage(playerid, COLOR_ADM, "USAGE: /wanted [playerid/DioImena] [reason]");
- if(!IsPlayerConnected(playerb))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You specified an invalid player.");
- if(!pLoggedIn[playerb])
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: That player hasn't logged in yet.");
- if(strlen(reason) < 3 || strlen(reason) > 128)
- return SendClientMessage(playerid, COLOR_ADM, "The reason must be between 3 to 128 characters.");
- mysql_format(m_Handle, add_query, sizeof(add_query), "INSERT INTO criminal_record (player_name, entry_reason, entry_date, entry_by) VALUES('%e', '%e', '%e', '%e')", ReturnName(playerb, 0), reason, ReturnDate(), ReturnName(playerid, 1));
- mysql_tquery(m_Handle, add_query, "OnPlayerAddCharge", "ii", playerid, playerb);
- return 1;
- }
- CMD:setp(playerid, params[])
- {
- if (!IsPoliceFaction(playerid))
- return SendClientMessage(playerid, COLOR_ADM, "PRISTUP ODBIJEN:{FFFFFFF} You aren't authorized to use this.");
- new
- id;
- if(sscanf(params, "i", id))
- return SendClientMessage(playerid, COLOR_ADM, "USAGE: /setp [precinct id, 1-3]");
- if(id < 1 || id > 3)
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You specified an invalid precinct.");
- switch(id)
- {
- case 1:
- {
- if(!FactionData[PlayerData[playerid][pFaction]][factionSpawnEx1][0])
- return SendClientMessage(playerid, COLOR_ADM, "That precinct hasn't been configured yet.");
- }
- case 2:
- {
- if(!FactionData[PlayerData[playerid][pFaction]][factionSpawnEx2][0])
- return SendClientMessage(playerid, COLOR_ADM, "That precinct hasn't been configured yet.");
- }
- case 3:
- {
- if(!FactionData[PlayerData[playerid][pFaction]][factionSpawnEx3][0])
- return SendClientMessage(playerid, COLOR_ADM, "That precinct hasn't been configured yet.");
- }
- }
- PlayerData[playerid][pSpawnPrecinct] = id;
- Message(playerid, COLOR_ADM, "[!] Your precinct spawn is now set (%d). You will spawn there on login.", id);
- return 1;
- }
- //FD Commands:
- CMD:finishop(playerid, params[])
- {
- if(!IsMedicFaction(playerid))
- return UnAuthMessage(playerid);
- if(!PlayerData[playerid][pMEDduty])
- return UnAuthMessage(playerid);
- new
- playerb,
- str[128];
- if(sscanf(params, "u", playerb))
- return SendClientMessage(playerid, COLOR_GREY, "USAGE: /finishop [playerid/DioImena]");
- if(!IsPlayerConnected(playerb))
- return SendClientMessage(playerid, COLOR_GREY, "ERROR: You specified an invalid player.");
- if(playerb == playerid)
- return SendClientMessage(playerid, COLOR_GREY, "ERROR: You can't heal yourself.");
- if(!GetDistanceBetweenPlayers(playerid, playerb, 6.0) && !IsPlayerInDynamicArea(playerb, HospitalArea))
- return SendClientMessage(playerid, COLOR_GREY, "SERVER: You aren't near that player.");
- if(GetPlayerTeam(playerb) != STATE_WOUNDED)
- return SendClientMessage(playerid, COLOR_GREY, "SERVER: The player needs to be brutally wounded.");
- PlayerData[playerb][pBrutallyWounded] = 0;
- SetPlayerTeam(playerb, STATE_ALIVE);
- SetPlayerHealth(playerb, 50);
- format(str, sizeof(str), "** HQ: %s %s finished an operation on %s! **", ReturnRank(playerid), ReturnName(playerid, 0), ReturnName(playerb));
- SendFDMessage(COLOR_EMT, str);
- format(str, sizeof(str), "%s revived %s with \"/finishop\".", ReturnName(playerid), ReturnName(playerb));
- adminWarn(1, str);
- Message(playerid, COLOR_EMT, "SERVER: You finished the operation on %s.", ReturnName(playerb, 0));
- Message(playerb, COLOR_EMT, "SERVER: You were operated on by %s.", ReturnName(playerid, 0));
- return 1;
- }
- CMD:putinambu(playerid, params[])
- {
- if(!IsMedicFaction(playerid))
- return UnAuthMessage(playerid);
- if(!PlayerData[playerid][pMEDduty])
- return UnAuthMessage(playerid);
- new
- playerb, str[128],
- vehicleid = GetPlayerVehicleID(playerid);
- if(GetVehicleModel(vehicleid) != 416)
- return SendClientMessage(playerid, COLOR_GREY, "SERVER: You aren't inside an ambulance.");
- if(sscanf(params, "u", playerb))
- return SendClientMessage(playerid, COLOR_GREY, "USAGE: /putinambu [playerid/DioImena]");
- if(!GetDistanceBetweenPlayers(playerid, playerb, 6.0) && !IsPlayerInDynamicArea(playerb, HospitalArea))
- return SendClientMessage(playerid, COLOR_GREY, "SERVER: You aren't near that player.");
- if(GetPlayerTeam(playerb) != STATE_WOUNDED)
- return SendClientMessage(playerid, COLOR_GREY, "SERVER: The player needs to be brutally wounded.");
- new
- seat_available = -1;
- foreach(new i : Player) if(IsPlayerInVehicle(i, vehicleid))
- {
- if(GetPlayerVehicleSeat(i) != 2)
- {
- seat_available = 2;
- }
- else if(GetPlayerVehicleSeat(i) != 3)
- {
- seat_available = 3;
- }
- }
- if(seat_available == -1)
- return SendClientMessage(playerid, COLOR_ADM, "SERVER: There's no room in your Ambulance.");
- format(str, sizeof(str), "puts %s into the ambulance.", ReturnName(playerb, 0));
- cmd_me(playerid, str);
- PutPlayerInVehicle(playerb, vehicleid, seat_available);
- PlayerData[playerb][pInsideAmbulance] = 1;
- return 1;
- }
- //
- CMD:buydrink(playerid, params[])
- {
- if(!IsPlayerInBusiness(playerid))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You aren't in an establishment.");
- new id = IsPlayerInBusiness(playerid);
- if(BusinessData[id][businessType] != BIZ_CLUB)
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: This isn't a club.");
- if(3 > PlayerData[playerid][pMoney])
- return SendClientMessage(playerid, COLOR_ADM, "You can't afford a drink. ($3)");
- SendClientMessage(playerid, COLOR_YELLOW, "You bought a Drink! Use /usedrink, /givedrink!");
- GiveMoney(playerid, -3);
- PlayerData[playerid][pDrinks]++;
- return 1;
- }
- //Business commands
- CMD:buybiz(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- if(CountPlayerBusinesses(playerid) == 1)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You already own a business.");
- new string[128], bizid = 0;
- for(new i = 0; i < MAX_BUSINESS; i++){
- if(BusinessData[i][businessID] != 0){
- if(IsPlayerInRangeOfPoint(playerid, 3.0, BusinessData[i][businessExt][0], BusinessData[i][businessExt][1], BusinessData[i][businessExt][2])){
- bizid = i;
- }
- }
- }
- if(bizid == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You aren't near any businesses.");
- if(BusinessData[bizid][businessOwnerSQL] != 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You can't buy a business that's already owned.");
- if(BusinessData[bizid][businessType] == 8 || BusinessData[bizid][businessType] == 9)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You can't buy this type of business.");
- if(PlayerData[playerid][pMoney] < BusinessData[bizid][businessMarketPrice]){
- format(string, sizeof(string), "Insufficient amount. This business cost $%s. Please arrange a sufficient payment.", MoneyFormat(BusinessData[bizid][businessMarketPrice]));
- SendClientMessage(playerid, COLOR_ADM, string);
- return true;
- }
- if(PlayerData[playerid][pLevel] < BusinessData[bizid][businessLevel])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You aren't the level required for this business.");
- GiveMoney(playerid, -BusinessData[bizid][businessMarketPrice]);
- BusinessData[bizid][businessOwnerSQL] = PlayerData[playerid][pSQLID];
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "Congratulations!~n~You're now the owner of this business!", 4000, 5);
- SaveSQLInt(BusinessData[bizid][businessID], "businesses", "OwnerSQL", BusinessData[bizid][businessOwnerSQL]);
- DestroyDynamicPickup(BusinessData[bizid][businessPickup]);
- BusinessData[bizid][businessPickup] = CreateDynamicPickup(1239, 14, BusinessData[bizid][businessExt][0], BusinessData[bizid][businessExt][1], BusinessData[bizid][businessExt][2], 0);
- return true;
- }
- CMD:sellbiz(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- if(CountPlayerBusinesses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own a business.");
- new string[128], confirm[60];
- if(sscanf(params, "s[60]", confirm))return SendClientMessage(playerid, COLOR_ADM, "SERVER:{FFFFFF} You're about to sell your business. Type /sellbiz confirm to confirm.");
- if(strmatch(confirm, "confirm")){
- for(new i = 0; i < MAX_BUSINESS; i++){
- if(BusinessData[i][businessID] != 0){
- if(IsPlayerInRangeOfPoint(playerid, 3.0, BusinessData[i][businessExt][0], BusinessData[i][businessExt][1], BusinessData[i][businessExt][2])){
- if(BusinessData[i][businessOwnerSQL] != PlayerData[playerid][pSQLID])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this business.");
- BusinessData[i][businessOwnerSQL] = 0;
- SaveSQLInt(BusinessData[i][businessID], "businesses", "OwnerSQL", 0);
- GameTextForPlayer(playerid, "You sold your business!", 3000, 5);
- format(string, sizeof(string), "SERVER:{FFFFFF} You sold your business. You were paid $%s of the market price.", MoneyFormat(BusinessData[i][businessMarketPrice] / 2));
- SendClientMessage(playerid, COLOR_ADM, string);
- GiveMoney(playerid, BusinessData[i][businessMarketPrice] / 2);
- }
- }
- }
- }
- return true;
- }
- CMD:bizinfo(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- if(CountPlayerBusinesses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR: You don't own a business.");
- if(!IsPlayerInBusiness(playerid))return SendClientMessage(playerid, COLOR_ADM, "ERROR: You aren't in your business.");
- new bizid = IsPlayerInBusiness(playerid), string[128], lockString[40];
- if(BusinessData[bizid][businessOwnerSQL] != PlayerData[playerid][pSQLID])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this business.");
- if(BusinessData[bizid][businessLocked])
- format(lockString, sizeof(lockString), "Yes");
- else
- format(lockString, sizeof(lockString), "No");
- SendClientMessage(playerid, COLOR_DARKGREEN, "____________________________________________");
- format(string, sizeof(string), "*** %s ***", BusinessData[bizid][businessName]);
- SendClientMessage(playerid, COLOR_DARKGREEN, string);
- format(string, sizeof(string), "Owner:[%s] Level:[%d] Value:[%d] Type:[%d] Locked:[%s] ID:[%d]", ReturnName(playerid, 1), BusinessData[bizid][businessLevel],
- BusinessData[bizid][businessMarketPrice], BusinessData[bizid][businessType], lockString, BusinessData[bizid][businessID]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- format(string, sizeof(string), "Cashbox:[%s] Entrance Fee:[%s] Products[%d / 500]", MoneyFormat(BusinessData[bizid][businessCashbox]), MoneyFormat(BusinessData[bizid][businessFee]), BusinessData[bizid][businessProduct]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- SendClientMessage(playerid, COLOR_WHITE, "Employees: /hirelist");
- SendClientMessage(playerid, COLOR_DARKGREEN, "____________________________________________");
- return true;
- }
- CMD:bizcashbox(playerid, params[])
- {
- if(CountPlayerBusinesses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR: You don't own a business.");
- if(!IsPlayerInBusiness(playerid))return SendClientMessage(playerid, COLOR_ADM, "ERROR: You aren't in your business.");
- new bizid = IsPlayerInBusiness(playerid),
- specifier[30],
- type[30];
- if(BusinessData[bizid][businessOwnerSQL] != PlayerData[playerid][pSQLID])
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You don't own this business.");
- if(sscanf(params, "s[30]S()[30]", specifier, type))
- {
- SendClientMessage(playerid, COLOR_DARKGREEN, "____________________________________________");
- Message(playerid, COLOR_ADM, "You have: $%s inside your business.", MoneyFormat(BusinessData[bizid][businessCashbox]));
- SendClientMessage(playerid, COLOR_GREY, "Use /bizcashbox [withdraw/deposit] to handle it.");
- return 1;
- }
- if(!strcmp(specifier, "withdraw"))
- {
- new amount;
- if(sscanf(type, "i", amount))
- return SendClientMessage(playerid, COLOR_DARKGREEN, "USAGE: /bizcashbox withdraw [amount]");
- if(amount < 1 || amount > BusinessData[bizid][businessCashbox])
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You specified an invalid amount.");
- WriteLog("business_logs/cashbox_withdraw.txt", "[%s] %s withdrew $%s from the $%s cashbox. [New amount: $%s]", ReturnDateLog(), ReturnName(playerid), MoneyFormat(amount), MoneyFormat(BusinessData[bizid][businessCashbox]), (BusinessData[bizid][businessCashbox]-amount));
- GiveMoney(playerid, amount);
- BusinessData[bizid][businessCashbox]-= amount;
- Message(playerid, COLOR_DARKGREEN, "You withdrew $%s from your business. (Total: $%s)", MoneyFormat(amount), MoneyFormat(BusinessData[bizid][businessCashbox]));
- }
- else if(!strcmp(specifier, "deposit"))
- {
- new amount;
- if(sscanf(type, "i", amount))
- return SendClientMessage(playerid, COLOR_DARKGREEN, "USAGE: /bizcashbox deposit [amount]");
- if(amount < 1 || amount > PlayerData[playerid][pMoney])
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You specified an invalid amount.");
- WriteLog("business_logs/cashbox_deposit.txt", "[%s] %s deposited %s into the %s cashbox. [New cashbox: $%s - New on hand: $%s]",
- ReturnDateLog(), ReturnName(playerid), MoneyFormat(amount), MoneyFormat(BusinessData[bizid][businessCashbox]), MoneyFormat((BusinessData[bizid][businessCashbox]+amount)), MoneyFormat((PlayerData[playerid][pMoney]-amount)));
- GiveMoney(playerid, -amount);
- BusinessData[bizid][businessCashbox]+= amount;
- Message(playerid, COLOR_DARKGREEN, "You deposited $%s into your business. (Total: $%s)", MoneyFormat(amount), MoneyFormat(BusinessData[bizid][businessCashbox]));
- }
- else return SendClientMessage(playerid, COLOR_ADM, "ERROR: Invalid Parameter.");
- return 1;
- }
- CMD:bizfee(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- if(CountPlayerBusinesses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own a business.");
- if(!IsPlayerInBusiness(playerid))return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You aren't in your business.");
- new bizid = IsPlayerInBusiness(playerid), string[128], fee;
- if(BusinessData[bizid][businessOwnerSQL] != PlayerData[playerid][pSQLID])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this business.");
- if(sscanf(params, "d", fee))return SendClientMessage(playerid, COLOR_ADM, "USAGE:{FFFFFF} /bizfee [0-50]");
- if(fee < 0 || fee > 50)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} Business fee must be between 0 and 50.");
- BusinessData[bizid][businessFee] = fee;
- SaveSQLInt(BusinessData[bizid][businessID], "businesses", "Fee", BusinessData[bizid][businessFee]);
- format(string, sizeof(string), "Your businesses' fee was set to $%d!", fee);
- SendClientMessage(playerid, COLOR_DARKGREEN, string);
- return true;
- }
- CMD:bizname(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- if(CountPlayerBusinesses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own a business.");
- if(!IsPlayerInBusiness(playerid))return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You aren't in your business.");
- new bizid = IsPlayerInBusiness(playerid), string[128], bName[128];
- if(BusinessData[bizid][businessOwnerSQL] != PlayerData[playerid][pSQLID])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this business.");
- if(sscanf(params, "s[128]", bName))return SendClientMessage(playerid, COLOR_ADM, "USAGE:{FFFFFF} /bizfee [business name]");
- format(BusinessData[bizid][businessName], 128, "%s", bName);
- SaveBusiness(bizid);
- format(string, sizeof(string), "Your business is now named %s!", bName);
- SendClientMessage(playerid, COLOR_DARKGREEN, string);
- return true;
- }
- CMD:hirelist(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- if(CountPlayerBusinesses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own a business.");
- if(!IsPlayerInBusiness(playerid))return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You aren't in your business.");
- new bizid = IsPlayerInBusiness(playerid);
- if(BusinessData[bizid][businessOwnerSQL] != PlayerData[playerid][pSQLID])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this business.");
- ShowBusinessEmployees(playerid, bizid);
- return true;
- }
- CMD:hire(playerid, params[])
- {
- if(CountPlayerBusinesses(playerid) == 0)
- return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own a business.");
- if(!IsPlayerInBusiness(playerid))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You aren't in your business.");
- new
- bizid = IsPlayerInBusiness(playerid),
- playerb;
- if(BusinessData[bizid][businessOwnerSQL] != PlayerData[playerid][pSQLID])
- return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this business.");
- if(!isnull(params) && !strcmp(params, "cancel"))
- {
- if(OfferedHireTo[playerid] == INVALID_PLAYER_ID)
- return SendClientMessage(playerid, COLOR_ADM, "SERVER: You haven't made an offer to anyone.");
- Message(OfferedHireTo[playerid], COLOR_ADM, "SERVER: %s cancelled their offer for you.", ReturnName(playerid));
- Message(playerid, COLOR_ADM, "SERVER: You cancelled your offer to %s.", ReturnName(OfferedHireTo[playerid]));
- OfferedHireBy[OfferedHireTo[playerid]] = INVALID_PLAYER_ID;
- OfferedHireTo[playerid] = INVALID_PLAYER_ID;
- OfferedHireBusinessID[playerid] = 0;
- return 1;
- }
- if(OfferedHireTo[playerid] != INVALID_PLAYER_ID)
- return SendClientMessage(playerid, COLOR_ADM, "SERVER: You have a pending offer. Wait for them to accept or cancel.");
- if(sscanf(params, "u", playerb))
- return SendClientMessage(playerid, COLOR_ADM, "USAGE: /hire [playerid/DioImena]");
- if(!IsPlayerConnected(playerb))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You specified an invalid player.");
- if(!GetDistanceBetweenPlayers(playerid, playerb, 5.0))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You aren't near that player.");
- if(OfferedHireBy[playerb] != INVALID_PLAYER_ID)
- return SendClientMessage(playerid, COLOR_ADM, "SERVER: This player already has an offer.");
- Message(playerid, COLOR_ADM, "You offered %s to work for %s.", ReturnName(playerb, 0), BusinessData[bizid][businessName]);
- SendClientMessage(playerid, COLOR_ADM, "Use /hire cancel to disregard the offer.");
- Message(playerb, COLOR_ADM, "%s offered you a job at %s. Use /hireaccept YES to work there or /hireaccept NO.", ReturnName(playerid, 0), BusinessData[bizid][businessName]);
- OfferedHireBusinessID[playerid] = BusinessData[bizid][businessID];
- OfferedHireBy[playerb] = playerid;
- OfferedHireTo[playerid] = playerb;
- return 1;
- }
- CMD:hireaccept(playerid, params[])
- {
- if(OfferedHireBy[playerid] == INVALID_PLAYER_ID)
- return SendClientMessage(playerid, COLOR_ADM, "SERVER: Nobody offered you a job.");
- if(!strcmp(params, "yes", true))
- {
- Message(playerid, COLOR_ADM, "You accepted %s's offer and are now working at their business!", ReturnName(OfferedHireBy[playerid]));
- Message(OfferedHireBy[playerid], COLOR_ADM, "%s accepted your job offer.", ReturnName(playerid));
- PlayerData[playerid][pWorkOn] = OfferedHireBusinessID[OfferedHireBy[playerid]];
- OfferedHireTo[OfferedHireBy[playerid]] = INVALID_PLAYER_ID;
- OfferedHireBusinessID[OfferedHireBy[playerid]] = 0;
- OfferedHireBy[playerid] = INVALID_PLAYER_ID;
- }
- else if(!strcmp(params, "no", true))
- {
- Message(playerid, COLOR_ADM, "You declined %s's offer.", ReturnName(OfferedHireBy[playerid]));
- Message(OfferedHireBy[playerid], COLOR_ADM, "%s declined your job offer.", ReturnName(playerid));
- OfferedHireTo[OfferedHireBy[playerid]] = INVALID_PLAYER_ID;
- OfferedHireBusinessID[OfferedHireBy[playerid]] = 0;
- OfferedHireBy[playerid] = INVALID_PLAYER_ID;
- }
- else return SendClientMessage(playerid, COLOR_ADM, "SERVER: It's either a YES or a NO.");
- return 1;
- }
- CMD:quitwork(playerid, params[])
- {
- if(!PlayerData[playerid][pWorkOn])
- return SendClientMessage(playerid, COLOR_ADM, "SERVER: You aren't hired by any business.");
- Message(playerid, COLOR_ADM, "You quit your job at %s.", BusinessData[PlayerData[playerid][pWorkOn]][businessName]);
- PlayerData[playerid][pWorkOn] = 0;
- SavePlayer(playerid);
- return 1;
- }
- CMD:fire(playerid, params[])
- {
- if(CountPlayerBusinesses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own a business.");
- if(!IsPlayerInBusiness(playerid))return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You aren't in your business.");
- new bizid = IsPlayerInBusiness(playerid),
- playerb;
- if(BusinessData[bizid][businessOwnerSQL] != PlayerData[playerid][pSQLID])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this business.");
- if(sscanf(params, "u", playerb))
- return SendClientMessage(playerid, COLOR_ADM, "USAGE: /fire [playerid/DioImena]");
- if(!IsPlayerConnected(playerb))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You specified an invalid player.");
- if(!pLoggedIn[playerb])
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: That player isn't logged in.");
- if(PlayerData[playerb][pWorkOn] != BusinessData[bizid][businessID])
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: That player isn't one of your workers.");
- PlayerData[playerb][pWorkOn] = 0;
- SavePlayer(playerb);
- Message(playerb, COLOR_ADM, "%s fired you from their business.", ReturnName(playerid));
- Message(playerid, COLOR_ADM, "You fired %s.", ReturnName(playerb));
- return 1;
- }
- //Property Commands
- CMD:buyhouse(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- if(CountPlayerHouses(playerid) == 3)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You own maximum amount of houses.");
- new string[128], propertyID = 0;
- for(new i = 0; i < MAX_PROPERTY; i++){
- if(PropertyData[i][propertyid] != 0){
- if(IsPlayerInRangeOfPoint(playerid, 3.0, PropertyData[i][propertyExterior][0], PropertyData[i][propertyExterior][1], PropertyData[i][propertyExterior][2])){
- if(GetPlayerInterior(playerid) == PropertyData[i][propertyExteriorID] && GetPlayerVirtualWorld(playerid) == PropertyData[i][propertyExteriorWorld]){
- propertyID = i;
- }
- }
- }
- }
- if(propertyID == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You aren't near any properties.");
- if(PropertyData[propertyID][propertyOwnerSQL] != 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You can't buy property that's already owned.");
- if(PlayerData[playerid][pMoney] < PropertyData[propertyID][propertyMarketPrice]){
- format(string, sizeof(string), "Insufficient amount. This house cost $%s. Please arrange a sufficient payment.", MoneyFormat(PropertyData[propertyID][propertyMarketPrice]));
- SendClientMessage(playerid, COLOR_ADM, string);
- return true;
- }
- if(PlayerData[playerid][pLevel] < PropertyData[propertyID][propertyLevel])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You aren't the level required for this property.");
- GiveMoney(playerid, -PropertyData[propertyID][propertyMarketPrice]);
- PropertyData[propertyID][propertyOwnerSQL] = PlayerData[playerid][pSQLID];
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "Congratulations!~n~You're now the owner of this property!", 4000, 5);
- DestroyDynamic3DTextLabel(PropertyData[propertyID][ForSaleSign]);
- SaveSQLInt(PropertyData[propertyID][propertyid], "properties", "OwnerSQL", PropertyData[propertyID][propertyOwnerSQL]);
- WriteLog("property_logs/buyproperty_log.txt", "[%s] %s bought Property ID %i for $%s", ReturnDate(), ReturnName(playerid), propertyID, MoneyFormat(PropertyData[propertyID][propertyMarketPrice]));
- return true;
- }
- CMD:sellhouse(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- if(CountPlayerHouses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own a house.");
- new string[128], confirm[60];
- if(sscanf(params, "s[60]", confirm))return SendClientMessage(playerid, COLOR_ADM, "SERVER:{FFFFFF} You're about to sell your house. Type /sellhouse confirm to confirm. ");
- if(strmatch(confirm, "confirm")){
- for(new i = 0; i < MAX_PROPERTY; i++){
- if(PropertyData[i][propertyid] != 0){
- if(IsPlayerInRangeOfPoint(playerid, 4.0, PropertyData[i][propertyExterior][0], PropertyData[i][propertyExterior][1], PropertyData[i][propertyExterior][2]))
- {
- if(PropertyData[i][propertyOwnerSQL] != PlayerData[playerid][pSQLID])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this house.");
- PropertyData[i][propertyOwnerSQL] = 0;
- SaveSQLInt(PropertyData[i][propertyid], "properties", "OwnerSQL", 0);
- DestroyDynamic3DTextLabel(PropertyData[i][ForSaleSign]);
- if(PropertyData[i][propertyType] == 1){
- format(string, sizeof(string), "Complex[%d] For Sale:\nPrice: $%d\nLevel: %d", i, PropertyData[i][propertyMarketPrice], PropertyData[i][propertyLevel]);
- PropertyData[i][ForSaleSign] = CreateDynamic3DTextLabel(string, COLOR_TEXTDRAW, PropertyData[i][propertyExterior][0], PropertyData[i][propertyExterior][1], PropertyData[i][propertyExterior][2], 15.0);
- }
- else if(PropertyData[i][propertyType] == 2){
- format(string, sizeof(string), "Apartment[%d] For Sale:\nPrice: $%d\nLevel: %d", i, PropertyData[i][propertyMarketPrice], PropertyData[i][propertyLevel]);
- PropertyData[i][ForSaleSign] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, PropertyData[i][propertyExterior][0], PropertyData[i][propertyExterior][1], PropertyData[i][propertyExterior][2], 20.0, .worldid = PropertyData[i][propertyExteriorWorld]);
- }
- else if(PropertyData[i][propertyType] == 3){
- format(string, sizeof(string), "House[%d] For Sale:\nPrice: $%d\nLevel: %d", i, PropertyData[i][propertyMarketPrice], PropertyData[i][propertyLevel]);
- PropertyData[i][ForSaleSign] = CreateDynamic3DTextLabel(string, COLOR_YELLOW, PropertyData[i][propertyExterior][0], PropertyData[i][propertyExterior][1], PropertyData[i][propertyExterior][2], 15.0);
- }
- PlayerData[playerid][pSpawnSelect] = 0;
- GameTextForPlayer(playerid, "You sold your property!", 3000, 5);
- format(string, sizeof(string), "SERVER:You sold your house. You were paid $%s of the market price.", MoneyFormat(PropertyData[i][propertyMarketPrice] / 2));
- SendClientMessage(playerid, COLOR_ADM, string);
- GiveMoney(playerid, PropertyData[i][propertyMarketPrice] / 2);
- WriteLog("property_logs/sellproperty_log.txt", "[%s] %s sold Property ID %i for $%s", ReturnDate(), ReturnName(playerid), i, MoneyFormat(PropertyData[i][propertyMarketPrice] / 2));
- SavePlayer(playerid);
- return true;
- }
- }
- }
- }
- SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You aren't near a house.");
- return true;
- }
- CMD:home(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- if(CountPlayerHouses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own any houses.");
- for(new i = 0; i < MAX_PROPERTY; i++)
- {
- if(PropertyData[i][propertyid] != 0){
- if(PropertyData[i][propertyOwnerSQL] == PlayerData[playerid][pSQLID]){
- SetPlayerCheckpoint(playerid, PropertyData[i][propertyExterior][0], PropertyData[i][propertyExterior][1], PropertyData[i][propertyExterior][2], 3.0);
- GameTextForPlayer(playerid, "~r~Waypoint ~y~set to your home!", 4000, 4);
- }
- }
- }
- return true;
- }
- CMD:cmdspot(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- new hid = IsPlayerInProperty(playerid);
- if(hid == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You can't do this right now.");
- if (PropertyData[hid][propertyOwnerSQL] != PlayerData[playerid][pSQLID])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this house.");
- GetPlayerPos(playerid, Resources[playerid][CmdSpot][0], Resources[playerid][CmdSpot][1], Resources[playerid][CmdSpot][2]);
- PropertyData[hid][propertyCheckPos][0] = Resources[playerid][CmdSpot][0];
- PropertyData[hid][propertyCheckPos][1] = Resources[playerid][CmdSpot][1];
- PropertyData[hid][propertyCheckPos][2] = Resources[playerid][CmdSpot][2];
- SaveSQLFloat(PropertyData[hid][propertyid], "properties", "CheckPosX", Resources[playerid][CmdSpot][0]);
- SaveSQLFloat(PropertyData[hid][propertyid], "properties", "CheckPosY", Resources[playerid][CmdSpot][1]);
- SaveSQLFloat(PropertyData[hid][propertyid], "properties", "CheckPosZ", Resources[playerid][CmdSpot][2]);
- SendClientMessage(playerid, COLOR_WHITE, "You've set a new spot to perform certain commands at.");
- SendClientMessage(playerid, COLOR_WHITE, "/takegun, /place");
- return true;
- }
- CMD:check(playerid, params[])
- {
- if(!pLoggedIn[playerid]) return true;
- new string[2000], hid = IsPlayerInProperty(playerid);
- string[0] = 0;
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(!IsValidFactionCar(vehicleid) && !IsValidPlayerCar(vehicleid))
- return SendClientMessage(playerid, COLOR_ADM, "SERVER: This command can only be used for private vehicles. You are in a public static vehicle.");
- if(IsValidPlayerCar(vehicleid))
- {
- for(new i = 1; i < 8; i++)
- {
- if(!CarData[vehicleid][carWeapons][i])
- format(string, sizeof(string), "%s%d. [Empty]\n", string, i);
- else
- format(string, sizeof(string), "%s%d. %s[Ammo: %d]\n", string, i, ReturnWeaponName(CarData[vehicleid][carWeapons][i]), CarData[vehicleid][carWeaponsAmmo][i]);
- ShowPlayerDialog(playerid, DIALOG_USE, DIALOG_STYLE_LIST, "Trunk", string, ">>>", "");
- }
- }
- else if(IsValidFactionCar(vehicleid))
- {
- if(FactionCar[vehicleid][carFaction] > 0 && FactionCar[vehicleid][carFaction] == PlayerData[playerid][pFaction] && FactionCar[vehicleid][carGunRack])
- {
- ShowPlayerDialog(playerid, DIALOG_USE, DIALOG_STYLE_LIST, "Trunk", "1. Shotgun[Ammo: 100]\n2. MP5[Ammo:200]\n3. M4[Ammo:200]\n4. SPAZ[Ammo:100]\n5. Sniper[Ammo:50]\n6. Camera\n7. Pepperspray", "Ok", "");
- }
- }
- }
- if(hid && IsPlayerInRangeOfPoint(playerid, 3.0, PropertyData[hid][propertyCheckPos][0], PropertyData[hid][propertyCheckPos][1], PropertyData[hid][propertyCheckPos][2])){
- for(new i = 0; i < 21; i ++)
- {
- if(!PropertyData[hid][propertyWeapons][i])
- format(string, sizeof(string), "%s%d. [Empty]\n", string, i);
- else
- format(string, sizeof(string), "%s%d. %s[Ammo:%d]\n", string, i, ReturnWeaponName(PropertyData[hid][propertyWeapons][i]), PropertyData[hid][propertyAmmo][i]);
- }
- ShowPlayerDialog(playerid, DIALOG_USE, DIALOG_STYLE_LIST, "House Weapon Storage(Capacity of 20)", string, ">>>", "");
- }
- return true;
- }
- CMD:propdrugs(playerid, params[])
- {
- new
- id;
- if( (id = IsPlayerInProperty(playerid)) != 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, PropertyData[id][propertyCheckPos][0], PropertyData[id][propertyCheckPos][1], PropertyData[id][propertyCheckPos][2]) && isnull(params))
- {
- new primary_str[800], define_str[128];
- strcat(primary_str, "Slot\tDrug\tQuantity\n");
- for(new i = 1; i < MAX_PROPERTY_DRUGS; i++)
- {
- if(PropertyData[id][propertydrugQuantity][i])
- format(define_str, 128, "%i.\t%s\t%i\n", i, ReturnDrugsName(PropertyData[id][propertydrugType][i]), PropertyData[id][propertydrugQuantity][i]); //format(define_str, sizeof(define_str), "[ %i. %s (%d) ]\n", i, ReturnDrugsName(PropertyData[id][propertydrugType][i]), PropertyData[id][propertydrugQuantity][i]);
- else format(define_str, 128, "%i.\tEmpty\n", i);//format(define_str, sizeof(define_str), "[ %i. Empty ]\n", i);
- strcat(primary_str, define_str);
- }
- ShowPlayerDialog(playerid, DIALOG_USE, DIALOG_STYLE_TABLIST_HEADERS, "Property drugs", primary_str, "<<", ">>");
- }
- else
- {
- if(isnull(params))
- SendClientMessage(playerid, COLOR_ADM, "USAGE: You aren't at your safe position.");
- }
- new specifier[30], task[30];
- new queries[290];
- if(sscanf(params, "s[30]S()[30]", specifier, task))
- {
- SendClientMessage(playerid, COLOR_ADM, "USAGE: /propdrugs [put - remove] [slot_id]");
- SendClientMessage(playerid, COLOR_ADM, "TIP:{FFFFFF} View your houses drugs by leaving the paramater blank.");
- return 1;
- }
- if(!strcmp(specifier, "put", true))
- {
- new my_slot, my_quantity;
- new property_slot = -1;
- if(sscanf(task, "ii", my_slot, my_quantity))
- return SendClientMessage(playerid, COLOR_ADM, "USAGE: /propdrugs put [slot_id] [quantity]");
- if(my_slot < 1 || my_slot > MAX_PLAYER_DRUGS)
- return SendClientMessage(playerid, COLOR_GREY, "You specified an invalid slot.");
- if(!DrugData[playerid][drugQuanity][my_slot])
- return SendClientMessage(playerid, COLOR_GREY, "There's nothing in that drug slot.");
- if(my_quantity < 1 || my_quantity > DrugData[playerid][drugQuanity][my_slot])
- return SendClientMessage(playerid, COLOR_GREY, "You specified a bad amount.");
- for(new i = 1; i < MAX_PROPERTY_DRUGS; i++) if(!PropertyData[id][propertydrugQuantity][i])
- {
- property_slot = i;
- break;
- }
- if(property_slot == -1)
- return SendClientMessage(playerid, COLOR_GREY, "There's no room left in your house.");
- PropertyData[id][propertydrugType][property_slot] = DrugData[playerid][drugType][my_slot];
- PropertyData[id][propertydrugQuantity][property_slot] = my_quantity;
- mysql_format(m_Handle, queries, sizeof(queries), "INSERT INTO property_drugs (property_id, slot_id, drug_quantity, drug_type) VALUES(%i, %i, %i, %i)", PropertyData[id][propertyid], property_slot, my_quantity, DrugData[playerid][drugType][my_slot]);
- mysql_tquery(m_Handle, queries, "OnHouseDrugInsert", "iiii", playerid, id, DrugData[playerid][drugQuanity][my_slot], DrugData[playerid][drugType][my_slot]);
- DrugData[playerid][drugQuanity][my_slot]-= my_quantity;
- if(DrugData[playerid][drugQuanity][my_slot] < 1)
- {
- DrugData[playerid][drugType][my_slot] = 0;
- }
- new string[128];
- format(string, sizeof(string), "* %s puts something in the house.", ReturnName(playerid, 0));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 10.0, 3000);
- Message(playerid, COLOR_ADM, "You put {FFFFFF}%i{FF6347} grams of {FFFFFF}%s{FF6347} in the house.", my_quantity, ReturnDrugsName(PropertyData[id][propertydrugType][property_slot]));
- return 1;
- }
- else if(!strcmp(specifier, "remove", true))
- {
- new property_slot;
- new my_slot = ReturnDrugSlot(playerid);
- if(sscanf(task, "i", property_slot))
- return SendClientMessage(playerid, COLOR_ADM, "USAGE: /propdrugs remove [slot_id]");
- if(property_slot < 1 || property_slot >= MAX_PROPERTY_DRUGS)
- return SendClientMessage(playerid, COLOR_GREY, "You specified an invalid slot.");
- if(my_slot == -1)
- return SendClientMessage(playerid, COLOR_ADM, "You can't hold anymore drugs.");
- DrugData[playerid][drugQuanity][my_slot] = PropertyData[id][propertydrugQuantity][property_slot];
- DrugData[playerid][drugType][my_slot] = PropertyData[id][propertydrugType][property_slot];
- new string[128];
- format(string, sizeof(string), "* %s takes something from the house.", ReturnName(playerid, 0));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 10.0, 3000);
- Message(playerid, COLOR_ADM, "You took {FFFFFF}%i{FF6347} grams of {FFFFFF}%s{FF6347} from the house.", PropertyData[id][propertydrugQuantity][property_slot], ReturnDrugsName(PropertyData[id][propertydrugType][property_slot]));
- mysql_format(m_Handle, queries, sizeof(queries), "DELETE FROM property_drugs WHERE property_id = %i AND slot_id = %i", PropertyData[id][propertyid], property_slot);
- mysql_tquery(m_Handle, queries, "OnHouseDrugRemove", "iiii", playerid, id, PropertyData[id][propertydrugQuantity][property_slot], PropertyData[id][propertydrugType][property_slot]);
- PropertyData[id][propertydrugQuantity][property_slot] = 0;
- PropertyData[id][propertydrugType][property_slot] = 0;
- return 1;
- }
- else SendClientMessage(playerid, COLOR_ADM, "SERVER: Invalid Paramater.");
- }
- else SendClientMessage(playerid, COLOR_ADM, "You aren't inside a house.");
- return 1;
- }
- CMD:place(playerid, params[])
- {
- new
- string[128],
- id,
- slot_id,
- weapon_id,
- ammo
- ;
- if((id = IsPlayerInProperty(playerid)) != 0)
- {
- if(!IsPlayerInRangeOfPoint(playerid, 4.0, PropertyData[id][propertyCheckPos][0], PropertyData[id][propertyCheckPos][1], PropertyData[id][propertyCheckPos][2]))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You aren't near the command spot.");
- if(GetPlayerWeapon(playerid) == 0)
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You aren't holding your weapon.");
- weapon_id = ReturnWeapon(playerid);
- if(weapon_id == -1)
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You aren't holding a weapon.");
- ammo = ReturnWeaponAmmo(playerid, weapon_id);
- slot_id = House_ReturnWeaponSlot(id);
- PropertyData[id][propertyWeapons][slot_id] = weapon_id;
- PropertyData[id][propertyAmmo][slot_id] = ammo;
- TakePlayerWeapon(playerid, weapon_id);
- SaveProperty(id);
- format(string, sizeof(string), "* %s stores a %s in the house.", ReturnName(playerid, 0), ReturnWeaponName(weapon_id));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- WriteLog("weapon_logs/property_place.txt", "[%s] %s (DBID: %i) placed %s (Ammo: %i) in Property %i", ReturnDate(), ReturnName(playerid), PlayerData[playerid][pSQLID], ReturnWeaponName(weapon_id), ammo, id);
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- id = GetPlayerVehicleID(playerid);
- if(!IsValidFactionCar(id) && !IsValidPlayerCar(id))
- return SendClientMessage(playerid, COLOR_ADM, "SERVER: This command can only be used for private vehicles. You are in a public static vehicle.");
- if(IsValidPlayerCar(id))
- {
- if(sscanf(params, "i", weapon_id))
- return SendClientMessage(playerid, COLOR_ADM, "USAGE: /place [weapon id]");
- if(!PlayerHasWeapon(playerid, weapon_id))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You don't have that weapon.");
- slot_id = Car_ReturnWeaponSlot(id);
- if(slot_id == -1)
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: This vehicle is at full capacity.");
- ammo = ReturnWeaponAmmo(playerid, weapon_id);
- if(SlotBeingUsed[id][slot_id])
- return SendClientMessage(playerid, COLOR_ADM, "You can't place your weapon there right now.");
- PlayerPlacingWeapon[playerid] = 1;
- PlayerPlacingWeaponSlot[playerid] = slot_id;
- PlayerPlacingWeaponID[playerid] = weapon_id;
- PlayerPlacingWeaponAmmo[playerid] = ammo;
- SlotBeingUsed[id][slot_id] = 1;
- PlayerPlacingInVehicle[playerid] = id;
- new
- Float:x[3];
- GetPlayerPos(playerid, x[0], x[1], x[2]);
- CarData[id][carWeaponObject][slot_id] = CreateDynamicObject(ReturnWeaponsModel(weapon_id), x[0], x[1], x[2], 80.0, 0.0, 0.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
- EditDynamicObject(playerid, CarData[id][carWeaponObject][slot_id]);
- SendClientMessage(playerid, COLOR_ADM, "INFO: Hold {FFFFFF}W{FF6347} or {FFFFFF}SPACE{FF6347} to move your camera.");
- Message(playerid, COLOR_YELLOW, "You're storing a %s with %i Ammo.", ReturnWeaponName(weapon_id), ammo);
- RemovePlayerWeapon(playerid, weapon_id);
- /*CarData[id][carWeapons][slot_id] = weapon_id;
- CarData[id][carWeaponsAmmo][slot_id] = ammo;
- TakePlayerWeapon(playerid, weapon_id);
- SaveCar(id);
- format(string, sizeof(string), "* %s stores a %s in the %s.", ReturnName(playerid, 0), ReturnWeaponName(weapon_id), ReturnVehicleName(id));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 20.0, 2000);
- format(string, sizeof(string), "[!] You have stored a %s in the %s.", ReturnWeaponName(weapon_id), ReturnVehicleName(id));
- SendClientMessage(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "%s put a %s[%d] (slot %d)", ReturnName(playerid), ReturnWeaponName(weapon_id), ammo, slot_id);
- LogVehicleAction(id, string);
- WriteLog("weapon_logs/vehicle_place.txt", "[%s] %s (DBID: %i) placed %s (Ammo: %i) in Vehicle DBID %i", ReturnDate(), ReturnName(playerid), PlayerData[playerid][pSQLID], ReturnWeaponName(weapon_id), ammo, CarData[id][carID]);*/
- return 1;
- }
- if(IsValidFactionCar(id) && FactionData[FactionCar[id][carFaction]][factionCopPerms])
- {
- if(sscanf(params, "i", weapon_id))
- return SendClientMessage(playerid, COLOR_ADM, "USAGE: /place [weapon id]");
- if(weapon_id != 25 && weapon_id != 29 && weapon_id != 27 && weapon_id != 31 && weapon_id != 34 && weapon_id != 41 && weapon_id != 43)
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You can't put that in this car.");
- switch(weapon_id)
- {
- case 25:
- {
- if(!PlayerHasWeapon(playerid, 25) && !IsSaveableWeapon(playerid, 25))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You don't have this weapon.");
- TakePlayerWeapon(playerid, 25);
- format(string, sizeof(string), "* %s places their Shotgun in the %s.", ReturnName(playerid, 0), ReturnVehicleName(id));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- }
- case 29:
- {
- if(!PlayerHasWeapon(playerid, 29) && !IsSaveableWeapon(playerid, 29))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You don't have this weapon.");
- TakePlayerWeapon(playerid, 29);
- format(string, sizeof(string), "* %s places their MP5 in the %s.", ReturnName(playerid, 0), ReturnVehicleName(id));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- }
- case 31:
- {
- if(!PlayerHasWeapon(playerid, 31) && !IsSaveableWeapon(playerid, 31))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You don't have this weapon.");
- TakePlayerWeapon(playerid, 31);
- format(string, sizeof(string), "* %s places their M4 in the %s.", ReturnName(playerid, 0), ReturnVehicleName(id));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- }
- case 34:
- {
- if(!PlayerHasWeapon(playerid, 34) && !IsSaveableWeapon(playerid, 34))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You don't have this weapon.");
- TakePlayerWeapon(playerid, 34);
- format(string, sizeof(string), "* %s places their Sniper Rifle in the %s.", ReturnName(playerid, 0), ReturnVehicleName(id));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- }
- case 41:
- {
- if(!PlayerHasWeapon(playerid, 41) && !IsSaveableWeapon(playerid, 41))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You don't have this weapon.");
- TakePlayerWeapon(playerid, 41);
- format(string, sizeof(string), "* %s places their Spray Can in the %s.", ReturnName(playerid, 0), ReturnVehicleName(id));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- }
- case 43:
- {
- if(!PlayerHasWeapon(playerid, 45) && !IsSaveableWeapon(playerid, 45))
- return SendClientMessage(playerid, COLOR_ADM, "ERROR: You don't have this weapon.");
- TakePlayerWeapon(playerid, 45);
- format(string, sizeof(string), "* %s places their Camera in the %s.", ReturnName(playerid, 0), ReturnVehicleName(id));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- }
- }
- return 1;
- }
- }
- SendClientMessage(playerid, COLOR_ADM, "SERVER: You can't place your weapon anywhere.");
- return 1;
- }
- CMD:takegun(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- new string[128], hid = IsPlayerInProperty(playerid), slotid;
- new WEAPON_INDEX;
- if(IsPlayerInRangeOfPoint(playerid, 3.0, PropertyData[hid][propertyCheckPos][0], PropertyData[hid][propertyCheckPos][1], PropertyData[hid][propertyCheckPos][2]))
- {
- if(sscanf(params, "d", slotid))return SendClientMessage(playerid, COLOR_ADM, "USAGE:{FFFFFF} /takegun slot_id");
- if(!PropertyData[hid][propertyWeapons][slotid])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} There's nothing in that slot.");
- if(Weapon[playerid][WEAPON_INDEX][eWeaponID] > 25) return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You can only equip one primary weapon at a time.");
- if(slotid < 0 || slotid > 20)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} That slot doesn't exist.");
- GivePlayerGun(playerid, PropertyData[hid][propertyWeapons][slotid], PropertyData[hid][propertyAmmo][slotid], WEAPON_UNKNOWN_GIVEN);
- format(string, sizeof(string), "* %s takes a %s from the house.", ReturnName(playerid, 0), ReturnWeaponName(PropertyData[hid][propertyWeapons][slotid]));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- WriteLog("weapon_logs/property_take.txt", "[%s] %s took %s (Ammo: %d) from Property DBID %d", ReturnDate(), ReturnName(playerid, 1), ReturnWeaponName(PropertyData[hid][propertyWeapons][slotid]),
- PropertyData[hid][propertyAmmo][slotid], hid);
- PropertyData[hid][propertyWeapons][slotid] = 0;
- PropertyData[hid][propertyAmmo][slotid] = 0;
- SaveProperty(hid);
- return true;
- }
- if(IsPlayerInAnyVehicle(playerid)) {
- new vehicleid = GetPlayerVehicleID(playerid), w_slot_id;
- if(!IsValidFactionCar(vehicleid) && !IsValidPlayerCar(vehicleid))
- return SendClientMessage(playerid, COLOR_ADM, "SERVER: This command can only be used for private vehicles. You are in a public static vehicle.");
- if ( IsValidPlayerCar(vehicleid) ) {
- if(sscanf(params, "d", w_slot_id)) return SendClientMessage(playerid, COLOR_ADM, "USAGE: /takegun slot_id");
- if ( w_slot_id < 1 || w_slot_id > 4 ) return SendClientMessage(playerid, COLOR_ADM, "ERROR: That slot doesn't exist.");
- if ( !CarData[vehicleid][carWeapons][w_slot_id] ) return SendClientMessage(playerid, COLOR_ADM, "ERROR: There's nothing in that slot.");
- GivePlayerGun(playerid, CarData[vehicleid][carWeapons][w_slot_id], CarData[vehicleid][carWeaponsAmmo][w_slot_id], WEAPON_UNKNOWN_GIVEN);
- SetPlayerArmedWeapon(playerid,0);
- format(string, sizeof(string), "* %s takes a %s from the %s.", ReturnName(playerid, 0), ReturnWeaponName(CarData[vehicleid][carWeapons][w_slot_id]), ReturnVehicleName(vehicleid));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- WriteLog("weapon_logs/vehicle_take.txt", "[%s] %s took %s (Ammo: %d) from %s (Vehicle DBID %d)", ReturnDate(), ReturnName(playerid, 1), ReturnWeaponName(CarData[vehicleid][carWeapons][w_slot_id]),
- CarData[vehicleid][carWeaponsAmmo][w_slot_id], ReturnVehicleName(vehicleid), CarData[vehicleid][carID]);
- format(string, sizeof(string), "%s took a %s[%d] (slot %d)", ReturnName(playerid), ReturnWeaponName(CarData[vehicleid][carWeapons][w_slot_id]), CarData[vehicleid][carWeaponsAmmo][w_slot_id], w_slot_id);
- LogVehicleAction(vehicleid, string);
- if(IsValidDynamicObject(CarData[vehicleid][carWeaponObject][w_slot_id]))
- DestroyDynamicObject(CarData[vehicleid][carWeaponObject][w_slot_id]);
- CarData[vehicleid][carWeapons][w_slot_id] = 0;
- CarData[vehicleid][carWeaponsAmmo][w_slot_id] = 0;
- SaveCar(vehicleid);
- return true;
- }
- else if( IsValidFactionCar(vehicleid) ) {
- if(FactionCar[vehicleid][carFaction] != PlayerData[playerid][pFaction])
- return SendClientMessage(playerid, COLOR_ADM, "PRISTUP ODBIJEN:{FFFFFF} You don't have the keys to this vehicle.");
- if(FactionCar[vehicleid][carGunRack]) {
- if(sscanf(params, "d", w_slot_id)) return SendClientMessage(playerid, COLOR_WHITE, "/takegun slot_id (ID List in /check.)");
- if ( w_slot_id < 0 || w_slot_id > 7 ) return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} That slot ID does not exist.");
- switch ( w_slot_id ) {
- case 1: {
- GivePlayerGun(playerid, 25, 100, WEAPON_SERVER_GIVEN);
- format(string, sizeof(string), "* %s takes a Shotgun from the %s.", ReturnName(playerid, 0), ReturnVehicleName(vehicleid));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- }
- case 2: {
- GivePlayerGun(playerid, 29, 200, WEAPON_SERVER_GIVEN);
- format(string, sizeof(string), "* %s takes a MP5 from the %s.", ReturnName(playerid, 0), ReturnVehicleName(vehicleid));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- }
- case 3: {
- GivePlayerGun(playerid, 31, 200, WEAPON_SERVER_GIVEN);
- format(string, sizeof(string), "* %s takes a M4 from the %s.", ReturnName(playerid, 0), ReturnVehicleName(vehicleid));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- }
- case 4: { return SendClientMessage(playerid, COLOR_ADM, "SERVER: This is not available right now. "); }
- case 5: {
- GivePlayerGun(playerid, 34, 200, WEAPON_SERVER_GIVEN);
- format(string, sizeof(string), "* %s takes a Sniper Rifle from the %s.", ReturnName(playerid, 0), ReturnVehicleName(vehicleid));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- }
- case 6: {
- GivePlayerGun(playerid, 43, 100, WEAPON_SERVER_GIVEN);
- format(string, sizeof(string), "* %s takes a Camera from the %s.", ReturnName(playerid, 0), ReturnVehicleName(vehicleid));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- }
- case 7: {
- GivePlayerGun(playerid, 41, 200, WEAPON_SERVER_GIVEN);
- format(string, sizeof(string), "* %s takes a Spray Can from the %s.", ReturnName(playerid, 0), ReturnVehicleName(vehicleid));
- SetPlayerChatBubble(playerid, string, COLOR_EMOTE, 25.0, 3000);
- SendClientMessage(playerid, COLOR_EMOTE, string);
- }
- }
- return true;
- }
- else {
- SendClientMessage(playerid, COLOR_ADM, "SERVER: Unavailable Feature.");
- return true;
- }
- }
- }
- SendClientMessage(playerid, COLOR_ADM, "SERVER: You can't do this right now.");
- return true;
- }
- CMD:myhouse(playerid, params[])
- {
- if( CountPlayerHouses(playerid) == 0 )
- return SendClientMessage(playerid, COLOR_ADM, "You don't own a house.");
- new prim_str[30], sub_str[30], thr_str[30];
- new id;
- if( !IsPlayerInProperty(playerid) )
- return SendClientMessage(playerid, COLOR_ADM, "You aren't inside a house.");
- id = IsPlayerInProperty(playerid);
- if( PropertyData[id][propertyOwnerSQL] != PlayerData[playerid][pSQLID] )
- return SendClientMessage(playerid, COLOR_ADM, "You don't own this house.");
- if( sscanf(params, "s[30]S()[30]S()[30]", prim_str, sub_str, thr_str) )
- return SendClientMessage(playerid, COLOR_ADM, "USAGE: /myhouse [info, cashbox]");
- if(!strcmp(prim_str, "info", true))
- {
- new garage_id;
- for(new i; i < MAX_PROPERTY_GARAGES; i++)
- {
- if(GarageData[i][garagePropertyID] == id)
- garage_id = i;
- }
- Message(playerid, COLOR_GREY, "Your House ID is: %i", id);
- Message(playerid, COLOR_GREY, "Garage ID:[%s] Market price:[$%s] Level:[%i]", (garage_id != 0) ? (MoneyFormat(garage_id)) : ("None"), MoneyFormat(PropertyData[id][propertyMarketPrice]), PropertyData[id][propertyLevel]);
- }
- else if(!strcmp(prim_str, "cashbox", true))
- {
- new ink[32], quantity;
- if(sscanf(sub_str, "s[32]", ink))
- return SendClientMessage(playerid, COLOR_ADM, "USAGE: /myhouse cashbox [ take, put, info ]");
- if(!strcmp(ink, "take", true))
- {
- if(sscanf(thr_str, "i", quantity))
- return SendClientMessage(playerid, COLOR_ADM, "USAGE: /myhouse cashbox take [quantity]");
- if( quantity < 1 || quantity > PropertyData[id][propertyMoney] )
- return SendClientMessage(playerid, COLOR_ADM, "You specified an invalid amount.");
- WriteLog("property_logs/cashboxtake_log.txt", "[%s] %s took $%s from Property %i's Cashbox. [Previous cashbox: $%i - Onhand now: $%i]", ReturnDateLog(), ReturnName(playerid), MoneyFormat(quantity), PropertyData[id][propertyid], (PropertyData[id][propertyMoney]-quantity), (PlayerData[playerid][pMoney]+quantity));
- Message(playerid, COLOR_GREY, "[%s] You took $%s from the $%s in your cashbox.", ReturnDateLog(), MoneyFormat(quantity), MoneyFormat(PropertyData[id][propertyMoney]));
- GiveMoney( playerid, quantity );
- PropertyData[id][propertyMoney]-= quantity;
- SaveSQLInt(PropertyData[id][propertyid], "properties", "Money", PropertyData[id][propertyMoney]);
- }
- else if(!strcmp(ink, "put", true))
- {
- if(sscanf(thr_str, "i", quantity))
- return SendClientMessage(playerid, COLOR_ADM, "USAGE: /myhouse cashbox put [quantity]");
- if( quantity < 1 || quantity > PlayerData[playerid][pMoney] )
- return SendClientMessage(playerid, COLOR_ADM, "You specified an invalid amount.");
- WriteLog("property_logs/cashboxput_log.txt", "[%s] %s put $%s into Property %i's Cashbox. [Previous cashbox: $%i - Previous Onhand: $%i - Onhand now: $%i]", ReturnDateLog(), ReturnName(playerid), MoneyFormat(quantity), PropertyData[id][propertyid], PropertyData[id][propertyMoney], PlayerData[playerid][pMoney], (PlayerData[playerid][pMoney]-quantity));
- Message(playerid, COLOR_GREY, "[%s] You put $%s into the current $%s cashbox.", ReturnDateLog(), MoneyFormat(quantity), MoneyFormat(PropertyData[id][propertyMoney]));
- PropertyData[id][propertyMoney]+= quantity;
- GiveMoney( playerid, -quantity );
- SaveSQLInt(PropertyData[id][propertyid], "properties", "Money", PropertyData[id][propertyMoney]);
- }
- else if(!strcmp(ink, "info", true))
- {
- Message(playerid, COLOR_GREY, "As of %s, you have $%s in your cashbox.", ReturnDateLog(), MoneyFormat(PropertyData[id][propertyMoney]));
- }
- else return SendClientMessage(playerid, COLOR_ADM, "SERVER: Nevazeca opcija.");
- }
- else return SendClientMessage(playerid, COLOR_ADM, "SERVER: Nevazeca opcija.");
- return 1;
- }
- CMD:setrentable(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- new hid = IsPlayerInProperty(playerid);
- if(CountPlayerHouses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own any houses.");
- if (!hid)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You need to be inside your house.");
- if(PropertyData[hid][propertyOwnerSQL] != PlayerData[playerid][pSQLID])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this house.");
- if(PropertyData[hid][propertyRentable] == 0){
- PropertyData[hid][propertyRentable] = 1;
- SaveSQLInt(PropertyData[hid][propertyid], "properties", "Rentable", PropertyData[hid][propertyRentable]);
- SendClientMessage(playerid, COLOR_DARKGREEN, "Your house is now rentable. Use `/setrent` to set the rent.");
- }
- else{
- PropertyData[hid][propertyRentable] = 0;
- SaveSQLInt(PropertyData[hid][propertyid], "properties", "Rentable", PropertyData[hid][propertyRentable]);
- SendClientMessage(playerid, COLOR_DARKGREEN, "Your house is no longer rentable.");
- }
- return true;
- }
- CMD:setrent(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- new string[128], rent, hid = IsPlayerInProperty(playerid);
- if(CountPlayerHouses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own any houses.");
- if (!hid)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You need to be inside your house.");
- if(PropertyData[hid][propertyOwnerSQL] != PlayerData[playerid][pSQLID])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this house.");
- if(sscanf(params, "d", rent))return SendClientMessage(playerid, COLOR_ADM, "USAGE:{FFFFFF} /setrent [$1-$500]");
- if(rent < 0 || rent > 500)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} The rent must be at least $1 and not greater than $500.");
- PropertyData[hid][propertyRentPrice] = rent;
- SaveSQLInt(PropertyData[hid][propertyid], "properties", "RentPrice", PropertyData[hid][propertyRentPrice]);
- format(string, sizeof(string), "Your houses rent is now $%s.", MoneyFormat(rent));
- SendClientMessage(playerid, COLOR_ADM, string);
- WriteLog("property_logs/setrent_log.txt", "[%s] %s set their House DBID %i rent to $%s", ReturnDate(), ReturnName(playerid), hid, MoneyFormat(rent));
- return true;
- }
- CMD:rentroom(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- new string[128];
- if(PlayerData[playerid][pRenting])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You can only rent at one house.");
- for(new i = 0; i < MAX_PROPERTY; i++)
- {
- if(PropertyData[i][propertyid] != 0){
- if(IsPlayerInRangeOfPoint(playerid, 3.0, PropertyData[i][propertyExterior][0], PropertyData[i][propertyExterior][1], PropertyData[i][propertyExterior][2])){
- if(!PropertyData[i][propertyRentable])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} This house isn't rentable.");
- if(PropertyData[i][propertyOwnerSQL] == PlayerData[playerid][pSQLID])
- return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You can't rent at your own home.");
- PlayerData[playerid][pRenting] = PropertyData[i][propertyid];
- GiveMoney(playerid, -PropertyData[i][propertyRentPrice]);
- SaveSQLInt(PlayerData[playerid][pSQLID], "players", "Renting", PlayerData[playerid][pRenting]);
- format(string, sizeof(string), "You're now renting at this house. Cost: $%s.", MoneyFormat(PropertyData[i][propertyRentPrice]));
- SendClientMessage(playerid, COLOR_ADM, string);
- WriteLog("property_logs/rentroom_log.txt", "[%s] %s is renting house ID %d", ReturnDate(), ReturnName(playerid, 1), i);
- return true;
- }
- }
- }
- SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You're not near a house.");
- return true;
- }
- CMD:unrentroom(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- if(!PlayerData[playerid][pRenting])
- return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You aren't renting anywhere.");
- PlayerData[playerid][pRenting] = false;
- cmd_setspawn(playerid, "1");
- return true;
- }
- CMD:tenants(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- new hid = IsPlayerInProperty(playerid);
- if(CountPlayerHouses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own any houses.");
- if (!hid)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You need to be inside your house.");
- if(PropertyData[hid][propertyOwnerSQL] != PlayerData[playerid][pSQLID])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this house.");
- ShowTenantNames(playerid, hid);
- return true;
- }
- CMD:evictall(playerid, params[])
- {
- if(!pLoggedIn[playerid])return true;
- new hid = IsPlayerInProperty(playerid);
- if(CountPlayerHouses(playerid) == 0)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own any houses.");
- if (!hid)return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You need to be inside your house.");
- if(PropertyData[hid][propertyOwnerSQL] != PlayerData[playerid][pSQLID])return SendClientMessage(playerid, COLOR_ADM, "ERROR:{FFFFFF} You don't own this house.");
- new confirm[90];
- if(sscanf(params, "s[90]", confirm))return SendClientMessage(playerid, COLOR_ADM, "SERVER:{FFFFFF} Are you sure you want to evict all your tenants? Type /evictall `confirm` to continue.");
- if(strmatch(confirm, "confirm")){
- EvictAllTenants(playerid, hid);
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement