Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:accept(playerid, params[])
- {
- new string[128];
- new sendername[MAX_PLAYER_NAME];
- new giveplayer[MAX_PLAYER_NAME];
- new giveplayerid;
- if(IsPlayerConnected(playerid)) {
- if(isnull(params)) {
- SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /accept [name]");
- SendClientMessageEx(playerid, COLOR_GREY, "Available names: Sex, Mats, Crack, Pot, Weapon, Craft, Repair, Lawyer, Bodyguard, Job, Live, Refill");
- SendClientMessageEx(playerid, COLOR_GREY, "Available names: Faction, RR, Family, Taxi, Bus, Boxing, Medic, Mechanic, Ticket, Car, Supcall, Izzys Death");
- return 1;
- }
- if(strcmp(params,"drink",true) == 0) {
- if((DrinkOffer[playerid] != INVALID_PLAYER_ID) && (IsPlayerConnected(DrinkOffer[playerid]))) {
- if (ProxDetectorS(8.0, playerid, DrinkOffer[playerid])) {
- ShowPlayerDialog(playerid, DRINKLISTDIALOG, DIALOG_STYLE_LIST, "Available Drinks", "Beer ($60)\nVodka ($100)\nWhiskey ($100)\nWater ($20)\nSoda($20)", "Purchase", "Cancel");
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You're too far away from the bartender.");
- DrinkOffer[playerid] = INVALID_PLAYER_ID;
- return 1;
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one has offered you a drink.");
- return 1;
- }
- }
- if(strcmp(params,"death",true) == 0) {
- if(GetPVarInt(playerid, "Injured") == 1) {
- SendClientMessageEx(playerid, COLOR_WHITE, "You gave up hope and fell unconscious, you were immediately sent to the hospital.");
- KillEMSQueue(playerid);
- ResetPlayerWeaponsEx(playerid);
- SpawnPlayer(playerid);
- }
- else { SendClientMessageEx(playerid, COLOR_GREY, " You are not injured, you can't do this right now !"); }
- }
- if(strcmp(params,"car",true) == 0) {
- if(VehicleOffer[playerid] < 999) {
- if(IsPlayerConnected(VehicleOffer[playerid])) {
- if(GetPlayerCash(playerid) > VehiclePrice[playerid]) {
- if(IsPlayerInVehicle(VehicleOffer[playerid], PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvId])) {
- if(!ProxDetectorS(8.0, VehicleOffer[playerid], playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not near the car dealer");
- new playervehicleid = GetPlayerFreeVehicleId(playerid);
- new carsamount = GetPlayerVehicleCount(playerid);
- if(PlayerInfo[playerid][pDonateRank] == 0 && carsamount >= 2) return SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You can't have more cars.");
- if(PlayerInfo[playerid][pDonateRank] == 1 && carsamount >= 3) return SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You can't have more cars.");
- if(PlayerInfo[playerid][pDonateRank] == 2 && carsamount >= 4) return SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You can't have more cars.");
- if(PlayerInfo[playerid][pDonateRank] == 3 && carsamount >= 5) return SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You can't have more cars.");
- if(playervehicleid == -1) return SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You can't have more cars.");
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(VehicleOffer[playerid], ipex, sizeof(ipex));
- format(string, sizeof(string), "[CAR] %s (IP: %s) has paid $%d to %s for the %s (IP: %s)", GetPlayerNameEx(playerid), ip, VehiclePrice[playerid], GetPlayerNameEx(VehicleOffer[playerid]), GetVehicleName(PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvId]), ipex);
- Log("logs/pay.log", string);
- GetPlayerName(VehicleOffer[playerid], giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* You bought the %s for $%d, from %s. (Check /carhelp for more help)", GetVehicleName(PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvId]), VehiclePrice[playerid],giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* You sold your %s to %s for $%d.",GetVehicleName(PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvId]), sendername,VehiclePrice[playerid]);
- SendClientMessageEx(VehicleOffer[playerid], COLOR_LIGHTBLUE, string);
- GivePlayerCash( VehicleOffer[playerid], VehiclePrice[playerid] );
- GivePlayerCash(playerid, -VehiclePrice[playerid]);
- RemovePlayerFromVehicle(VehicleOffer[playerid]);
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(VehicleOffer[playerid], slx, sly, slz);
- SetPlayerPos(VehicleOffer[playerid], slx, sly, slz+2);
- PlayerVehicleInfo[playerid][playervehicleid][pvId] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvId];
- PlayerVehicleInfo[playerid][playervehicleid][pvModelId] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvModelId];
- PlayerVehicleInfo[playerid][playervehicleid][pvPosX] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosX];
- PlayerVehicleInfo[playerid][playervehicleid][pvPosY] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosY];
- PlayerVehicleInfo[playerid][playervehicleid][pvPosZ] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosZ];
- PlayerVehicleInfo[playerid][playervehicleid][pvPosAngle] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosAngle];
- PlayerVehicleInfo[playerid][playervehicleid][pvLock] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvLock];
- PlayerVehicleInfo[playerid][playervehicleid][pvLocked] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvLocked];
- PlayerVehicleInfo[playerid][playervehicleid][pvPaintJob] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPaintJob];
- PlayerVehicleInfo[playerid][playervehicleid][pvColor1] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvColor1];
- PlayerVehicleInfo[playerid][playervehicleid][pvColor2] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvColor2];
- strmid(PlayerVehicleInfo[playerid][playervehicleid][pvAllowPlayer], PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvAllowPlayer], 0, strlen(PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvAllowPlayer]), 255);
- PlayerVehicleInfo[playerid][playervehicleid][pvAllowedPlayerId] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvAllowedPlayerId];
- PlayerVehicleInfo[playerid][playervehicleid][pvPark] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPark];
- for(new m = 0; m < MAX_MODS; m++) {
- PlayerVehicleInfo[playerid][playervehicleid][pvMods][m] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvMods][m];
- }
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvId] = 0;
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvModelId] = 0;
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosX] = 0.0;
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosY] = 0.0;
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosZ] = 0.0;
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosAngle] = 0.0;
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvLock] = 0;
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvLocked] = 0;
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPaintJob] = -1;
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvColor1] = 0;
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvImpounded] = 0;
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvColor2] = 0;
- strmid(PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvAllowPlayer], "No-one", 0, strlen("No-one"), 255);
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvAllowedPlayerId] = INVALID_PLAYER_ID;
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPark] = 0;
- for(new m = 0; m < MAX_MODS; m++) {
- PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvMods][m] = 0;
- }
- VehicleOffer[playerid] = 999;
- VehiclePrice[playerid] = 0;
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " The Car Dealer is not in the offered car!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the car!");
- return 1;
- }
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " Nobody offered to buy a car!");
- return 1;
- }
- }
- if(strcmp(params,"house",true) == 0) {
- if(HouseOffer[playerid] < 999) {
- if(IsPlayerConnected(HouseOffer[playerid])) {
- if(PlayerInfo[HouseOffer[playerid]][pPhousekey] == INVALID_HOUSE_ID) {
- SendClientMessageEx(playerid, COLOR_WHITE, "They don't own that house");
- return 1;
- }
- if(GetPlayerCash(playerid) > HousePrice[playerid]) {
- new house;
- if(House[playerid] == 1) house = PlayerInfo[HouseOffer[playerid]][pPhousekey];
- else if(House[playerid] == 2) house = PlayerInfo[HouseOffer[playerid]][pPhousekey2];
- else return SendClientMessageEx(playerid, COLOR_RED, "Error: No house specified");
- ClearHouse(house);
- HouseInfo[house][hLock] = 1;
- format( HouseInfo[house][hOwner], 128, "Nobody" );
- sendername = GetPlayerNameEx(HouseOffer[playerid]);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", HousePrice[playerid]);
- GameTextForPlayer(HouseOffer[playerid], string, 4000, 3);
- if(House[playerid] == 1) PlayerInfo[HouseOffer[playerid]][pPhousekey] = INVALID_HOUSE_ID;
- else PlayerInfo[HouseOffer[playerid]][pPhousekey2] = INVALID_HOUSE_ID;
- SaveHouses();
- OnPlayerStatsUpdate(HouseOffer[playerid]);
- DestroyDynamicPickup(HouseInfo[house][hPickupID]);
- HouseInfo[house][hPickupID] = CreateDynamicPickup(1273, 23, HouseInfo[house][hExteriorX], HouseInfo[house][hExteriorY], HouseInfo[house][hExteriorZ]);
- GivePlayerCash(HouseOffer[playerid],HousePrice[playerid]);
- PlayerInfo[playerid][pPhousekey] = house;
- HouseInfo[house][hOwned] = 1;
- GetPlayerName(playerid, sendername, sizeof(sendername));
- strmid(HouseInfo[house][hOwner], sendername, 0, strlen(sendername), 255);
- GivePlayerCash(playerid,-HousePrice[playerid]);
- SendClientMessageEx(playerid, COLOR_WHITE, "Congratulations on your new purchase!");
- SendClientMessageEx(playerid, COLOR_WHITE, "Type /help to review the property help section!");
- SaveHouses();
- OnPlayerStatsUpdate(playerid);
- DestroyDynamicPickup(HouseInfo[house][hPickupID]);
- HouseInfo[house][hPickupID] = CreateDynamicPickup(1273, 23, HouseInfo[house][hExteriorX], HouseInfo[house][hExteriorY], HouseInfo[house][hExteriorZ]);
- format(string, sizeof(string), "This house is owned by\n %s\nLevel: %d\nID: %d",HouseInfo[house][hOwner],HouseInfo[house][hLevel],house);
- UpdateDynamic3DTextLabelText(HouseInfo[house][hTextID], COLOR_GREEN, string);
- new ip[32], ipex[32];
- GetPlayerIp(HouseOffer[playerid],ip,sizeof(ip));
- GetPlayerIp(playerid,ipex,sizeof(ipex));
- format(string,sizeof(string),"%s (IP: %s) has sold their house (ID %d) to %s (IP: %s) for $%d.",GetPlayerNameEx(HouseOffer[playerid]),ip,house,GetPlayerNameEx(playerid),ipex,HousePrice[playerid]);
- Log("logs/house.log", string);
- HouseOffer[playerid] = 999;
- HousePrice[playerid] = 0;
- House[playerid] = 0;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the house!");
- HouseOffer[playerid] = 999;
- HousePrice[playerid] = 0;
- House[playerid] = 0;
- return 1;
- }
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " Nobody offered to buy a house!");
- return 1;
- }
- }
- else if(strcmp(params, "handshake",true) == 0) {
- new
- Count;
- foreach(Player, i) {
- if(GetPVarInt(i, "shrequest") == playerid) {
- new
- Float: ppFloats[3];
- GetPlayerPos(i, ppFloats[0], ppFloats[1], ppFloats[2]);
- if(!IsPlayerInRangeOfPoint(playerid, 5, ppFloats[0], ppFloats[1], ppFloats[2])) {
- Count++;
- SendClientMessageEx(playerid, COLOR_WHITE, "You're too far away. You can't accept the handshake right now.");
- }
- else {
- switch(GetPVarInt(i, "shstyle")) {
- case 1:
- {
- Count++;
- PlayerFacePlayer( playerid, i );
- ApplyAnimation( playerid, "GANGS", "hndshkaa", 4.0, 1, 1, 1, 0, 1000 );
- ApplyAnimation( i, "GANGS", "hndshkaa", 4.0, 1, 1, 1, 0, 1000 );
- SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
- format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- DeletePVar(i, "shstyle");
- }
- case 2:
- {
- Count++;
- PlayerFacePlayer( playerid, i );
- ApplyAnimation( playerid, "GANGS", "hndshkba", 4.0, 1, 1, 1, 0, 1000 );
- ApplyAnimation( i, "GANGS", "hndshkba", 4.0, 1, 1, 1, 0, 1000 );
- SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
- format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- DeletePVar(i, "shstyle");
- }
- case 3:
- {
- Count++;
- PlayerFacePlayer( playerid, i );
- ApplyAnimation( playerid, "GANGS", "hndshkca", 4.0, 1, 1, 1, 0, 1000 );
- ApplyAnimation( i, "GANGS", "hndshkca", 4.0, 1, 1, 1, 0, 1000 );
- SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
- format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- DeletePVar(i, "shstyle");
- }
- case 4:
- {
- Count++;
- PlayerFacePlayer( playerid, i );
- ApplyAnimation( playerid, "GANGS", "hndshkcb", 4.0, 1, 1, 1, 0, 1000 );
- ApplyAnimation( i, "GANGS", "hndshkca", 4.0, 1, 1, 1, 0, 1000 );
- SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
- format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- DeletePVar(i, "shstyle");
- }
- case 5:
- {
- Count++;
- PlayerFacePlayer( playerid, i );
- ApplyAnimation( playerid, "GANGS", "hndshkda", 4.0, 1, 1, 1, 0, 1000 );
- ApplyAnimation( i, "GANGS", "hndshkca", 4.0, 1, 1, 1, 0, 1000 );
- SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
- format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- DeletePVar(i, "shstyle");
- }
- case 6:
- {
- Count++;
- PlayerFacePlayer( playerid, i );
- ApplyAnimation( playerid, "GANGS","hndshkfa_swt", 4.0, 1, 1, 1, 0, 2600 );
- ApplyAnimation( i, "GANGS","hndshkfa_swt", 4.0, 1, 1, 1, 0, 2600 );
- SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
- format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- DeletePVar(i, "shstyle");
- }
- case 7:
- {
- Count++;
- PlayerFacePlayer( playerid, i );
- ApplyAnimation( playerid, "GANGS", "prtial_hndshk_01", 4.0, 1, 1, 1, 0, 1250 );
- ApplyAnimation( i, "GANGS", "prtial_hndshk_01", 4.0, 1, 1, 1, 0, 1250 );
- SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
- format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- DeletePVar(i, "shstyle");
- }
- case 8:
- {
- Count++;
- PlayerFacePlayer( playerid, i );
- ApplyAnimation( playerid, "GANGS", "prtial_hndshk_biz_01", 3.7, 1, 1, 1, 0, 2200 );
- ApplyAnimation( i, "GANGS", "prtial_hndshk_biz_01", 3.5, 1, 1, 1, 0, 2200 );
- SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
- format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- DeletePVar(i, "shstyle");
- }
- }
- }
- }
- }
- if(Count == 0) return SendClientMessageEx(playerid, COLOR_WHITE, "You don't have any pending handshake requests.");
- return 1;
- }
- else if(strcmp(params,"invite",true) == 0)
- {
- if(hInviteOffer[playerid] < 999)
- {
- if(IsPlayerConnected(hInviteOffer[playerid]))
- {
- hInviteHouse[playerid] = (hInviteSlot[playerid] == 1) ? (PlayerInfo[hInviteOffer[playerid]][pPhousekey]) : (PlayerInfo[hInviteOffer[playerid]][pPhousekey2]);
- format(string, sizeof(string), "* You have accepted %s's house invite, a checkpoint has been set to their house.", GetPlayerNameEx(hInviteOffer[playerid]));
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s has accepted your house invite.", GetPlayerNameEx(playerid));
- SendClientMessageEx(hInviteOffer[playerid], COLOR_LIGHTBLUE, string);
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid,HouseInfo[hInviteHouse[playerid]][hExteriorX], HouseInfo[hInviteHouse[playerid]][hExteriorY], HouseInfo[hInviteHouse[playerid]][hExteriorZ], 4.0);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME;
- hInviteSlot[playerid] = 0;
- hInviteOffer[playerid] = 999;
- hInviteHouse[playerid] = INVALID_HOUSE_ID;
- return 1;
- }
- else
- {
- hInviteSlot[playerid] = 0;
- hInviteOffer[playerid] = 999;
- hInviteHouse[playerid] = INVALID_HOUSE_ID;
- SendClientMessageEx(playerid, COLOR_GREY, "The player who sent you a house invite has disconnected.");
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "Nobody sent you a house invite.");
- return 1;
- }
- return 1;
- }
- else if(strcmp(params,"divorce",true) == 0) {
- if(DivorceOffer[playerid] < 999) {
- if(IsPlayerConnected(DivorceOffer[playerid])) {
- if(ProxDetectorS(10.0, playerid, DivorceOffer[playerid])) {
- GetPlayerName(DivorceOffer[playerid], giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* You have signed the divorce papers from %s, you are now single again.", giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s has signed the divorce papers, you are now single again.", sendername);
- SendClientMessageEx(DivorceOffer[playerid], COLOR_LIGHTBLUE, string);
- ClearMarriage(playerid);
- ClearMarriage(DivorceOffer[playerid]);
- PlayerInfo[playerid][pPhousekey] = INVALID_HOUSE_ID;
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " The player that sent you the Divorce Papers is not near you!");
- return 1;
- }
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, "Nobody sent you any divorce papers.");
- return 1;
- }
- }
- else if(strcmp(params,"faction",true) == 0) {
- if(InviteOffer[playerid] < 999) {
- if(IsPlayerConnected(InviteOffer[playerid])) {
- if( PlayerInfo[playerid][pFactionBanned] >= 1 && PlayerInfo[playerid][pFactionBanned] == InviteFaction[playerid] ) {
- SendClientMessageEx(playerid, COLOR_WHITE, "You are unable to accept this faction invite, as you're banned from this faction. Contact a Head Admin.");
- return 1;
- }
- if(GetPVarInt(playerid, "IsInArena") >= 0) {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please wait until your Paintball Arena match is over.");
- return 1;
- }
- if( PlayerInfo[playerid][pCSFBanned] >= 1 ) {
- switch( InviteFaction[ playerid ] ) {
- case 1, 2, 3, 4, 5, 6, 7, 11, 12: return SendClientMessageEx(playerid, COLOR_WHITE, "You are unable to accept this faction invite, as you're banned from Civil Service Factions. Contact a Head Admin.");
- }
- }
- new ftext[64];
- if(InviteFaction[playerid] > 0 && InviteFamily[playerid] == 255) {
- if(InviteFaction[playerid] == 1) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "LSPD"; ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
- else if(InviteFaction[playerid] == 2) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "SAHP"; ChosenSkin[playerid] = 282; SetPlayerSkin(playerid, 282); }
- else if(InviteFaction[playerid] == 3) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "DOC"; ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
- else if(InviteFaction[playerid] == 4) { PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; ftext = "LSFD"; ChosenSkin[playerid] = 70; SetPlayerSkin(playerid, 70); }
- else if(InviteFaction[playerid] == 5) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "Superior Court System"; }
- else if(InviteFaction[playerid] == 6) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "City of Los Santos Government"; ChosenSkin[playerid] = 120; SetPlayerSkin(playerid, 258); }
- else if(InviteFaction[playerid] == 7) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "SASD"; ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); }
- else if(InviteFaction[playerid] == 8) { PlayerInfo[playerid][pTeam] = 10; gTeam[playerid] = 10; ftext = "Hitman Agency"; ChosenSkin[playerid] = 127; SetPlayerSkin(playerid, 127); }
- else if(InviteFaction[playerid] == 9) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Fox11 News"; ChosenSkin[playerid] = 148; SetPlayerSkin(playerid, 148); }
- else if(InviteFaction[playerid] == 10) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Taxi Cab Company"; ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
- else if(InviteFaction[playerid] == 11) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "NG"; ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
- else if(InviteFaction[playerid] == 12) { PlayerInfo[playerid][pTeam] = 13; gTeam[playerid] = 13; ftext = "Tierra Robada"; ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
- else if(InviteFaction[playerid] == 13) { PlayerInfo[playerid][pTeam] = 14; gTeam[playerid] = 14; ftext = "NOOSE"; ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
- else if(InviteFaction[playerid] == 14) { PlayerInfo[playerid][pTeam] = 14; gTeam[playerid] = 14; ftext = "Rapid Recovery"; ChosenSkin[playerid] = 50; SetPlayerSkin(playerid, 50); }
- else if(InviteFaction[playerid] == 15) { PlayerInfo[playerid][pTeam] = 15; gTeam[playerid] = 15; ftext = "Cal Trans"; ChosenSkin[playerid] = 27; SetPlayerSkin(playerid, 27); }
- else if(InviteFaction[playerid] == 16) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "TPS"; ChosenSkin[playerid] = 133; SetPlayerSkin(playerid, 133); }
- else if(InviteFaction[playerid] == 17) { PlayerInfo[playerid][pTeam] = 17; gTeam[playerid] = 17; ftext = "Izzy's Automotive"; ChosenSkin[playerid] = 16; SetPlayerSkin(playerid, 16); }
- else if(InviteFaction[playerid] == 18) { PlayerInfo[playerid][pTeam] = 18; gTeam[playerid] = 18; ftext = "VACANT FACTION"; ChosenSkin[playerid] = 16; SetPlayerSkin(playerid, 16); }
- else if(InviteFaction[playerid] == 19) { PlayerInfo[playerid][pTeam] = 19; gTeam[playerid] = 19; ftext = "VACANT FACTION"; ChosenSkin[playerid] = 16; SetPlayerSkin(playerid, 16); }
- else { return 1; }
- PlayerInfo[playerid][pMember] = InviteFaction[playerid];
- if(InviteFaction[playerid] == 1 || InviteFaction[playerid] == 9 || InviteFaction[playerid] == 13) {
- PlayerInfo[playerid][pRank] = 0;
- }
- else {
- PlayerInfo[playerid][pRank] = 1;
- }
- PlayerInfo[playerid][pDivision] = 0;
- format(string, sizeof(string), " You have accepted the invitation and joined the %s, you were invited by %s.", ftext, GetPlayerNameEx(InviteOffer[playerid]));
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), " %s has accepted the invitation and joined the %s.", GetPlayerNameEx(playerid),ftext);
- SendClientMessageEx(InviteOffer[playerid], COLOR_LIGHTBLUE, string);
- /*if(InviteFaction[playerid] != 5) {
- SetPlayerInterior(playerid,0);
- new rand = random(sizeof(gInviteSpawns));
- // Warp the player
- SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
- SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
- SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
- SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
- TogglePlayerControllable(playerid, 0);
- SelectChar[playerid] = 255;
- SelectCharID[playerid] = PlayerInfo[playerid][pMember];
- SelectCharPlace[playerid] = 1;
- PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
- PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
- SendClientMessageEx(playerid, COLOR_LIGHTRED, "* Use 'next' to browse through the available skins.");
- SendClientMessageEx(playerid, COLOR_LIGHTRED, "* If you've found the skin you wish to use, type 'done'.");
- }*/
- InviteOffer[playerid] = 999;
- InviteFaction[playerid] = 0;
- InviteFamily[playerid] = 255;
- }
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No one has invited you to join an organisation/family!");
- return 1;
- }
- }
- else if(strcmp(params,"family",true) == 0) {
- if(InviteOffer[playerid] < 999) {
- if(IsPlayerConnected(InviteOffer[playerid])) {
- if(InviteFaction[playerid] == 0 && InviteFamily[playerid] != 255) {
- if(GetPVarInt(playerid, "IsInArena") >= 0) {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please wait until your Paintball Arena match is over.");
- return 1;
- }
- if(PlayerInfo[playerid][pJailTime] > 1) {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please wait until you are released from jail/prison before you accept the invite.");
- return 1;
- }
- if( PlayerInfo[playerid][pMember] >= 3 || PlayerInfo[playerid][pFMember] != 255 || PlayerInfo[playerid][pLeader] >= 3 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pDivision] >= 3 || PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pDivision] == 1) {
- SendClientMessageEx(playerid, COLOR_WHITE, "You can't accept this invite as you're already in a family/faction.");
- }
- else {
- PlayerInfo[playerid][pFMember] = InviteFamily[playerid];
- PlayerInfo[playerid][pRank] = 1;
- FamilyInfo[InviteFamily[playerid]][FamilyMembers] ++;
- SaveFamilies();
- format(string, sizeof(string), " You have accepted the invitation and joined the %s, you were invited by %s.", FamilyInfo[InviteFamily[playerid]][FamilyName], GetPlayerNameEx(InviteOffer[playerid]));
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), " %s has accepted the invitation and joined the %s.", GetPlayerNameEx(playerid),FamilyInfo[InviteFamily[playerid]][FamilyName]);
- SendClientMessageEx(InviteOffer[playerid], COLOR_LIGHTBLUE, string);
- SendClientMessageEx(playerid, COLOR_WHITE, "Use (/f)amily to talk in family chat. If you wish to acquire a family skin, type /clothes inside a clothes store.");
- /*SetPlayerInterior(playerid,0);
- ChosenSkin[playerid] = FamilyInfo[InviteFamily[playerid]][FamilySkins][0];
- new rand = random(sizeof(gInviteSpawns));
- // Warp the player
- SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
- SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
- SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
- SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
- TogglePlayerControllable(playerid, 0);
- SetPlayerSkin(playerid, ChosenSkin[playerid]);
- SelectFChar[playerid] = 255;
- SelectFCharID[playerid] = PlayerInfo[playerid][pFMember];
- SelectFCharPlace[playerid] = 1;
- PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
- PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
- SendClientMessageEx(playerid, COLOR_LIGHTRED, "* Use 'next' to browse through the available skins.");
- SendClientMessageEx(playerid, COLOR_LIGHTRED, "* If you've found the skin you wish to use, type 'done'.");*/
- InviteOffer[playerid] = 999;
- InviteFaction[playerid] = 0;
- InviteFamily[playerid] = 255;
- }
- }
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No one has invited you to join an organisation/family!");
- return 1;
- }
- }
- else if(strcmp(params,"witness",true) == 0) {
- if(MarryWitnessOffer[playerid] < 999) {
- if(IsPlayerConnected(MarryWitnessOffer[playerid])) {
- if(ProxDetectorS(10.0, playerid, MarryWitnessOffer[playerid])) {
- GetPlayerName(MarryWitnessOffer[playerid], giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* You have accepted %s's request to be their marriage witness.", giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s has accepted your request to be your marriage witness.", sendername);
- SendClientMessageEx(MarryWitnessOffer[playerid], COLOR_LIGHTBLUE, string);
- MarryWitness[MarryWitnessOffer[playerid]] = playerid;
- MarryWitnessOffer[playerid] = 999;
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " The player that requested you to be their marriage witness is not near you!");
- return 1;
- }
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one asked you to be their marriage witness!");
- return 1;
- }
- }
- else if(strcmp(params,"marriage",true) == 0) {
- if(ProposeOffer[playerid] < 999) {
- if(IsPlayerConnected(ProposeOffer[playerid])) {
- if(ProxDetectorS(10.0, playerid, ProposeOffer[playerid])) {
- if(MarryWitness[ProposeOffer[playerid]] == 999) {
- SendClientMessageEx(playerid, COLOR_GREY, " The proposer doesn't have a marriage witness!");
- return 1;
- }
- if(IsPlayerConnected(MarryWitness[ProposeOffer[playerid]])) {
- if(ProxDetectorS(12.0, ProposeOffer[playerid], MarryWitness[ProposeOffer[playerid]])) {
- if(IsPlayerInRangeOfPoint(playerid, 10.0, 1963.9612, -369.1851, 1093.7289)) {
- GetPlayerName(ProposeOffer[playerid], giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* You have accepted %s's request to be your husband.", giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s has accepted your request to be your wife.", sendername);
- SendClientMessageEx(ProposeOffer[playerid], COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "Priest: %s, do you take %s as your lovely husband? (Type 'yes', as anything else will reject the marriage.)", sendername, giveplayer);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- MarriageCeremoney[playerid] = 1;
- ProposedTo[ProposeOffer[playerid]] = playerid;
- GotProposedBy[playerid] = ProposeOffer[playerid];
- MarryWitness[ProposeOffer[playerid]] = 999;
- ProposeOffer[playerid] = 999;
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You are not at the church!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " The marriage witness is not near your proposer!");
- return 1;
- }
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " The player that proposed to you is not near you!");
- return 1;
- }
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " Nobody proposed to you!");
- return 1;
- }
- }
- else if(strcmp(params,"ticket",true) == 0) {
- if(TicketOffer[playerid] < 999) {
- if(IsPlayerConnected(TicketOffer[playerid])) {
- if (ProxDetectorS(5.0, playerid, TicketOffer[playerid])) {
- if(GetPlayerCash(playerid) >= TicketMoney[playerid]) {
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(TicketOffer[playerid], ipex, sizeof(ipex));
- format(string, sizeof(string), "[FACTION TICKET] %s (IP: %s) has paid $%d to %s (IP: %s)", GetPlayerNameEx(playerid), ip, TicketMoney[playerid], GetPlayerNameEx(TicketOffer[playerid]), ipex);
- Log("logs/pay.log", string);
- format(string, sizeof(string), "* You have paid the ticket of $%d to %s.", TicketMoney[playerid], GetPlayerNameEx(TicketOffer[playerid]));
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s has paid your ticket of $%d.", GetPlayerNameEx(playerid), TicketMoney[playerid]);
- SendClientMessageEx(TicketOffer[playerid], COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s has paid the ticket.", GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerCash(playerid, - TicketMoney[playerid]);
- Tax += TicketMoney[playerid];
- TicketOffer[playerid] = 999;
- TicketMoney[playerid] = 0;
- if(GetPlayerCash(playerid) < 1) GivePlayerCash(playerid, 0);
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " The officer is not near you!");
- return 1;
- }
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you a ticket!");
- return 1;
- }
- }
- else if(strcmp(params,"boxing",true) == 0) {
- if(BoxOffer[playerid] < 999) {
- if(IsPlayerConnected(BoxOffer[playerid])) {
- new points;
- new mypoints;
- GetPlayerName(BoxOffer[playerid], giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new level = PlayerInfo[BoxOffer[playerid]][pBoxSkill];
- if(level >= 0 && level <= 50) { points = 40; }
- else if(level >= 51 && level <= 100) { points = 50; }
- else if(level >= 101 && level <= 200) { points = 60; }
- else if(level >= 201 && level <= 400) { points = 70; }
- else if(level >= 401) { points = 80; }
- if(PlayerInfo[playerid][pJob] == 12 || PlayerInfo[playerid][pJob2] == 12) {
- new clevel = PlayerInfo[playerid][pBoxSkill];
- if(clevel >= 0 && clevel <= 50) { mypoints = 40; }
- else if(clevel >= 51 && clevel <= 100) { mypoints = 50; }
- else if(clevel >= 101 && clevel <= 200) { mypoints = 60; }
- else if(clevel >= 201 && clevel <= 400) { mypoints = 70; }
- else if(clevel >= 401) { mypoints = 80; }
- }
- else {
- mypoints = 30;
- }
- format(string, sizeof(string), "* You have accepted the Boxing Challenge from %s, and will fight with %d Health.",giveplayer,mypoints);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s has accepted your Boxing Challenge Request, you will fight with %d Health.",sendername,points);
- SendClientMessageEx(BoxOffer[playerid], COLOR_LIGHTBLUE, string);
- if(IsPlayerInRangeOfPoint(playerid,20.0,758.98, -60.32, 1000.78) || IsPlayerInRangeOfPoint(BoxOffer[playerid],20.0,758.98, -60.32, 1000.78)) {
- ResetPlayerWeapons(playerid);
- ResetPlayerWeapons(BoxOffer[playerid]);
- SetPlayerHealth(playerid, mypoints);
- SetPlayerHealth(BoxOffer[playerid], points);
- SetPlayerInterior(playerid, 7); SetPlayerInterior(BoxOffer[playerid], 7);
- SetPlayerPos(playerid, 768.94, -70.87, 1001.56); SetPlayerFacingAngle(playerid, 131.8632);
- SetPlayerPos(BoxOffer[playerid], 764.35, -66.48, 1001.56); SetPlayerFacingAngle(BoxOffer[playerid], 313.1165);
- TogglePlayerControllable(playerid, 0); TogglePlayerControllable(BoxOffer[playerid], 0);
- GameTextForPlayer(playerid, "~r~Waiting", 3000, 1); GameTextForPlayer(BoxOffer[playerid], "~r~Waiting", 3000, 1);
- new name[MAX_PLAYER_NAME];
- new dstring[MAX_PLAYER_NAME];
- new wstring[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(dstring, sizeof(dstring), "%s", name);
- strmid(wstring, dstring, 0, strlen(dstring), 255);
- if(strcmp(Titel[TitelName] ,wstring, true ) == 0 ) {
- format(string, sizeof(string), "Boxing News: Boxing Champion %s will fight VS %s, in 60 seconds (Grove Street Gym).", sendername, giveplayer);
- OOCOff(COLOR_WHITE,string);
- TBoxer = playerid;
- BoxDelay = 60;
- }
- GetPlayerName(BoxOffer[playerid], name, sizeof(name));
- format(dstring, sizeof(dstring), "%s", name);
- strmid(wstring, dstring, 0, strlen(dstring), 255);
- if(strcmp(Titel[TitelName] ,wstring, true ) == 0 ) {
- format(string, sizeof(string), "Boxing News: Boxing Champion %s will fight VS %s, in 60 seconds (Grove Street Gym).", giveplayer, sendername);
- OOCOff(COLOR_WHITE,string);
- TBoxer = BoxOffer[playerid];
- BoxDelay = 60;
- }
- BoxWaitTime[playerid] = 1; BoxWaitTime[BoxOffer[playerid]] = 1;
- if(BoxDelay < 1) { BoxDelay = 20; }
- InRing = 1;
- Boxer1 = BoxOffer[playerid];
- Boxer2 = playerid;
- PlayerBoxing[playerid] = 1;
- PlayerBoxing[BoxOffer[playerid]] = 1;
- BoxOffer[playerid] = 999;
- return 1;
- }
- ResetPlayerWeapons(playerid);
- ResetPlayerWeapons(BoxOffer[playerid]);
- SetPlayerHealth(playerid, mypoints);
- SetPlayerHealth(BoxOffer[playerid], points);
- SetPlayerInterior(playerid, 5); SetPlayerInterior(BoxOffer[playerid], 5);
- SetPlayerPos(playerid, 762.9852,2.4439,1001.5942); SetPlayerFacingAngle(playerid, 131.8632);
- SetPlayerPos(BoxOffer[playerid], 758.7064,-1.8038,1001.5942); SetPlayerFacingAngle(BoxOffer[playerid], 313.1165);
- TogglePlayerControllable(playerid, 0); TogglePlayerControllable(BoxOffer[playerid], 0);
- GameTextForPlayer(playerid, "~r~Waiting", 3000, 1); GameTextForPlayer(BoxOffer[playerid], "~r~Waiting", 3000, 1);
- new name[MAX_PLAYER_NAME];
- new dstring[MAX_PLAYER_NAME];
- new wstring[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(dstring, sizeof(dstring), "%s", name);
- strmid(wstring, dstring, 0, strlen(dstring), 255);
- if(strcmp(Titel[TitelName] ,wstring, true ) == 0 ) {
- format(string, sizeof(string), "Boxing News: Boxing Champion %s will fight VS %s, in 60 seconds (Grove Street Gym).", sendername, giveplayer);
- OOCOff(COLOR_WHITE,string);
- TBoxer = playerid;
- BoxDelay = 60;
- }
- GetPlayerName(BoxOffer[playerid], name, sizeof(name));
- format(dstring, sizeof(dstring), "%s", name);
- strmid(wstring, dstring, 0, strlen(dstring), 255);
- if(strcmp(Titel[TitelName] ,wstring, true ) == 0 ) {
- format(string, sizeof(string), "Boxing News: Boxing Champion %s will fight VS %s, in 60 seconds (Grove Street Gym).", giveplayer, sendername);
- OOCOff(COLOR_WHITE,string);
- TBoxer = BoxOffer[playerid];
- BoxDelay = 60;
- }
- BoxWaitTime[playerid] = 1; BoxWaitTime[BoxOffer[playerid]] = 1;
- if(BoxDelay < 1) { BoxDelay = 20; }
- InRing = 1;
- Boxer1 = BoxOffer[playerid];
- Boxer2 = playerid;
- PlayerBoxing[playerid] = 1;
- PlayerBoxing[BoxOffer[playerid]] = 1;
- BoxOffer[playerid] = 999;
- return 1;
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you a Boxing Challenge!");
- return 1;
- }
- }
- // accept taxi
- else if(strcmp(params,"taxi",true) == 0) {
- if(TransportDuty[playerid] != 1) {
- SendClientMessageEx(playerid, COLOR_GREY, " You are not a Taxi Driver!");
- return 1;
- }
- if(TaxiCallTime[playerid] > 0) {
- SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted a taxi call!");
- return 1;
- }
- if(TaxiCall < 999) {
- if(IsPlayerConnected(TaxiCall)) {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GetPlayerName(TaxiCall, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* You have accepted the taxi call from %s, you will see the marker until you have reached it.",giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* Taxi Driver %s has accepted your Taxi Call; please wait at your current position.",sendername);
- SendClientMessageEx(TaxiCall, COLOR_LIGHTBLUE, string);
- GameTextForPlayer(playerid, "~w~Taxi Caller~n~~r~Go to the red marker.", 5000, 1);
- TaxiCallTime[playerid] = 1;
- TaxiAccepted[playerid] = TaxiCall;
- TaxiCall = 999;
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " Nobody called for a taxi yet!");
- return 1;
- }
- }
- else if(strcmp(params,"izzys",true) == 0) {
- if(PlayerInfo[playerid][pMember] != 17) {
- SendClientMessageEx(playerid, COLOR_GREY, " You are not apart of Izzy's Automotive!");
- return 1;
- }
- if(IACallTime[playerid] > 0) {
- SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted an IA Call!");
- return 1;
- }
- if(GetPVarInt(playerid, "Packages") >= 1 || IAAccepted[playerid] != 999 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- return 1;
- }
- if(IACall < 999) {
- if(IsPlayerConnected(IACall)) {
- if(playerid == IACall) return 1;
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GetPlayerName(IACall, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* You have accepted the IA Call from %s, you have 60 Seconds to get there.",giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* After the 60 Seconds the Red Marker will dissapear.");
- format(string, sizeof(string), "* Izzy's Automotive Worker %s has accepted your Call, please wait at your current position.",sendername);
- SendClientMessageEx(IACall, COLOR_LIGHTBLUE, string);
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(IACall, X, Y, Z);
- SetPlayerCheckpoint(playerid, X, Y, Z, 5);
- GameTextForPlayer(playerid, "~w~IA Caller~n~~r~Goto redmarker", 5000, 1);
- IACallTime[playerid] = 1;
- IAAccepted[playerid] = IACall;
- IACall = 999;
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one has called for Izzy's Automotive!");
- return 1;
- }
- }
- else if(strcmp(params,"rr",true) == 0)
- {
- new targetid;
- if(sscanf(params,"u",targetid)) return SendClientMessageEx(playerid,-1,"USAGE: /accept rr [Playerid/PartOfName]");
- if(PlayerInfo[playerid][pMember] != 14) {
- SendClientMessageEx(playerid, COLOR_GREY, " You are not apart of Rapid Recovery!");
- return 1;
- }
- if(RRCallTime[playerid] > 0) {
- SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted a RR Call!");
- return 1;
- }
- if(GetPVarInt(playerid, "Packages") >= 1 || RRAccepted[playerid] != 999 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- return 1;
- }
- if(IsPlayerConnected(targetid))
- {
- if(playerid == targetid) return 1;
- if(RequestedRRService[playerid] == 0) return SendClientMessageEx(playerid,-1,"That player must have cancelled their request!");
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GetPlayerName(targetid, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* You have accepted the RR Call from %s",giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- //SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* After the 60 Seconds the Red Marker will dissapear.");
- format(string, sizeof(string), "* Rapid Worker %s has accepted your RR Call, please wait at your current position.",sendername);
- SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(targetid, X, Y, Z);
- SetPlayerCheckpoint(playerid, X, Y, Z, 5);
- GameTextForPlayer(playerid, "~w~RR Caller~n~~r~Goto redmarker", 5000, 1);
- //RRCallTime[playerid] = 1;
- RRAccepted[playerid] = targetid;
- targetid = 999;
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one has called for Rapid Recovery!");
- return 1;
- }
- }
- else if(strcmp(params,"bus",true) == 0) {
- if(TransportDuty[playerid] != 2) {
- SendClientMessageEx(playerid, COLOR_GREY, " You are not a bus driver!");
- return 1;
- }
- if(BusCallTime[playerid] > 0) {
- SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted a bus call!");
- return 1;
- }
- if(BusCall < 999) {
- if(IsPlayerConnected(BusCall)) {
- if(GetPVarInt(playerid, "Packages") >= 1 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GetPlayerName(BusCall, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* You have accepted the Bus Call from %s, you will see the marker untill you have reached it.",giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* Bus Driver %s has accepted your bus call; please wait at your current position.",sendername);
- SendClientMessageEx(BusCall, COLOR_LIGHTBLUE, string);
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(BusCall, X, Y, Z);
- SetPlayerCheckpoint(playerid, X, Y, Z, 5);
- GameTextForPlayer(playerid, "~w~Bus Caller~n~~r~Goto redmarker", 5000, 1);
- BusCallTime[playerid] = 1;
- BusAccepted[playerid] = BusCall;
- BusCall = 999;
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one called for a Bus yet!");
- return 1;
- }
- }
- else if(strcmp(params,"medic",true) == 0) {
- if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) {
- if(MedicCallTime[playerid] > 0) {
- SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted a Medic Call!");
- return 1;
- }
- if(GetPVarInt(playerid, "Packages") >= 1 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- return 1;
- }
- if(MedicCall < 999) {
- if(IsPlayerConnected(MedicCall)) {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GetPlayerName(MedicCall, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* You have accepted the Medic Call from %s",giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* After the 45 Seconds the Red Marker will dissapear.");
- format(string, sizeof(string), "* Medic %s has accepted your Medic Call please wait at your current Position.",sendername);
- SendClientMessageEx(MedicCall, COLOR_LIGHTBLUE, string);
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(MedicCall, X, Y, Z);
- SetPlayerCheckpoint(playerid, X, Y, Z, 5);
- new zone[MAX_ZONE_NAME];
- GetPlayer3DZone(MedicCall, zone, sizeof(zone));
- format(string, sizeof(string), "HINT: %s is located in %s", GetPlayerNameEx(MedicCall), zone);
- SendClientMessageEx(playerid, COLOR_WHITE, string);
- MedicCallTime[playerid] = 1;
- MedicAccepted[playerid] = MedicCall;
- MedicCall = 999;
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one called for a Medic yet!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You are not a Medic!");
- return 1;
- }
- }
- else if(strcmp(params,"mechanic",true) == 0) {
- if(PlayerInfo[playerid][pJob] != 7 && PlayerInfo[playerid][pJob2] != 7) {
- SendClientMessageEx(playerid, COLOR_GREY, " You are not a Car Mechanic!");
- return 1;
- }
- if(MechanicCallTime[playerid] > 0) {
- SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted a Mechanic Call!");
- return 1;
- }
- if(GetPVarInt(playerid, "Packages") >= 1 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- return 1;
- }
- if(MechanicCall < 999) {
- if(IsPlayerConnected(MechanicCall)) {
- if(playerid == MechanicCall) return 1;
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GetPlayerName(MechanicCall, giveplayer, sizeof(giveplayer));
- format(string, sizeof(string), "* You have accepted the Mechanic Call from %s, you have 30 Seconds to get there.",giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* After the 30 Seconds the Red Marker will dissapear.");
- format(string, sizeof(string), "* Car Mechanic %s has accepted your Mechanic Call please wait at your current Position.",sendername);
- SendClientMessageEx(MechanicCall, COLOR_LIGHTBLUE, string);
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(MechanicCall, X, Y, Z);
- SetPlayerCheckpoint(playerid, X, Y, Z, 5);
- GameTextForPlayer(playerid, "~w~Mechanic Caller~n~~r~Goto redmarker", 5000, 1);
- MechanicCallTime[playerid] = 1;
- MechanicCall = 999;
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one called for a Car Mechanic yet!");
- return 1;
- }
- }
- else if(strcmp(params,"job",true) == 0) {
- if(GettingJob[playerid] > 0) {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Congratulations with your new Job, type /help to see your new command.");
- if(GettingJob[playerid] == 14) {
- SendClientMessageEx(playerid, COLOR_WHITE, "HINT: You can find drug crates in Willowfield. ( Goto checkpoint )");
- if(GetPVarInt(playerid, "Packages") >= 1 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
- SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
- return 1;
- }
- SetPlayerCheckpoint(playerid, 2076.4624,-2046.4349,13.5469, 3);
- }
- if(GettingJob[playerid] == 21) {
- SendClientMessageEx(playerid, COLOR_WHITE, "You have been given a Pizza Stack uniform!");
- PlayerInfo[playerid][pChar] = 155;
- PlayerInfo[playerid][pModel] = 155;
- SetPlayerSkin(playerid, 155);
- }
- PlayerInfo[playerid][pJob] = GettingJob[playerid];
- GettingJob[playerid] = 0;
- return 1;
- }
- if(GettingJob2[playerid] > 0) {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Congratulations with your new Job, type /help to see your new command.");
- SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have taken this as a secondary job.");
- if(GettingJob2[playerid] == 14) {
- SendClientMessageEx(playerid, COLOR_WHITE, "HINT: You can find drug crates in blueberry. ( Goto checkpoint )");
- SetPlayerCheckpoint(playerid, 51.9720,-292.6349,1.7031, 3);
- }
- if(GettingJob[playerid] == 17 || GettingJob2[playerid] == 17) {
- PlayerInfo[playerid][pTaxiLicense] = 1;
- }
- if(GettingJob2[playerid] == 21) {
- SendClientMessageEx(playerid, COLOR_WHITE, "You have been given a Pizza Stack uniform!");
- PlayerInfo[playerid][pChar] = 155;
- PlayerInfo[playerid][pModel] = 155;
- SetPlayerSkin(playerid, 155);
- }
- PlayerInfo[playerid][pJob2] = GettingJob2[playerid];
- GettingJob2[playerid] = 0;
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You haven't even been at a job place yet!");
- return 1;
- }
- }
- else if(strcmp(params,"live",true) == 0) {
- if(LiveOffer[playerid] < 999) {
- if(IsPlayerConnected(LiveOffer[playerid])) {
- if (ProxDetectorS(5.0, playerid, LiveOffer[playerid])) {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You are frozen till the Live Conversation ends.");
- SendClientMessageEx(LiveOffer[playerid], COLOR_LIGHTBLUE, "* You are frozen till the Live Conversation ends (use /live again).");
- TogglePlayerControllable(playerid, 0);
- TogglePlayerControllable(LiveOffer[playerid], 0);
- TalkingLive[playerid] = LiveOffer[playerid];
- TalkingLive[LiveOffer[playerid]] = playerid;
- LiveOffer[playerid] = 999;
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You are to far away from the News Reporter!");
- return 1;
- }
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one gave you a Live Conversation offer!");
- return 1;
- }
- }
- else if(strcmp(params,"lawyer",true) == 0) {
- if(sscanf(params[21], "u", giveplayerid))
- {
- SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /accept lawyer [playerid]");
- return 1;
- }
- if (gTeam[playerid] == 2 || IsACop(playerid)) {
- if(IsPlayerConnected(giveplayerid)) {
- if(giveplayerid != INVALID_PLAYER_ID) {
- if(PlayerInfo[giveplayerid][pJob] == 2 || PlayerInfo[giveplayerid][pJob2] == 2) {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* You allowed %s to free a Jailed Person.", giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE,string);
- format(string, sizeof(string), "* Officer %s approved (allowed) you to free a Jailed Person. (use /free)", sendername);
- SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE,string);
- ApprovedLawyer[giveplayerid] = 1;
- return 1;
- }
- }
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, "Invalid action! (You are no cop / Player is not a Lawyer / Bad ID)");
- return 1;
- }
- }
- else if(strcmp(params,"bodyguard",true) == 0) {
- if(GuardOffer[playerid] < 999) {
- if(GetPlayerCash(playerid) > GuardPrice[playerid]) {
- if(IsPlayerConnected(GuardOffer[playerid])) {
- if(ProxDetectorS(6.0, playerid, GuardOffer[playerid])) {
- new Float:armour;
- GetPlayerArmour(playerid, armour);
- if(armour >= 50) {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You already have a vest!");
- return 1;
- }
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(GuardOffer[playerid], ipex, sizeof(ipex));
- format(string, sizeof(string), "[BODYGUARD] %s (IP:%s) has paid $%d to %s (IP:%s)", GetPlayerNameEx(playerid), ip, GuardPrice[playerid], GetPlayerNameEx(GuardOffer[playerid]), ipex);
- Log("logs/pay.log", string);
- GuardWarn[playerid][GuardOffer[playerid]] += GuardPrice[playerid];
- if(GuardWarn[playerid][GuardOffer[playerid]] >= 25000 && (PlayerInfo[GuardOffer[playerid]][pLevel] <= 3 || PlayerInfo[playerid][pLevel] <= 3)) {
- format(string, sizeof(string), "%s (IP:%s) has guarded %s (IP:%s) $%d in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(GuardOffer[playerid]), ipex, GuardWarn[playerid][GuardOffer[playerid]]);
- Log("logs/pay.log", string);
- ABroadCast(COLOR_YELLOW, string, 2);
- }
- SetPlayerArmour(playerid, 50);
- GetPlayerName(GuardOffer[playerid], giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* You accepted the protection for $%d from %s.",GuardPrice[playerid],GetPlayerNameEx(GuardOffer[playerid]));
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s accepted your protection, and the $%d was added to your money.",GetPlayerNameEx(playerid),GuardPrice[playerid]);
- SendClientMessageEx(GuardOffer[playerid], COLOR_LIGHTBLUE, string);
- GivePlayerCash(GuardOffer[playerid], GuardPrice[playerid]);
- GivePlayerCash(playerid, -GuardPrice[playerid]);
- ExtortionTurfsWarsZone(GuardOffer[playerid], 2, GuardPrice[playerid]);
- GuardOffer[playerid] = 999;
- GuardPrice[playerid] = 0;
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GRAD2, "You are not near the person offering you guard!");
- return 1;
- }
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the Protection!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you any Protection!");
- return 1;
- }
- }
- else if(strcmp(params,"defense",true) == 0) {
- if(DefendOffer[playerid] < 999) {
- if(GetPlayerCash(playerid) > DefendPrice[playerid]) {
- if(IsPlayerConnected(DefendOffer[playerid])) {
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(DefendOffer[playerid], ipex, sizeof(ipex));
- format(string, sizeof(string), "[LAWYER] %s (IP:%s) has paid $%d to %s (IP:%s)", GetPlayerNameEx(playerid), ip, DefendPrice[playerid], GetPlayerNameEx(DefendOffer[playerid]), ipex);
- Log("logs/pay.log", string);
- PlayerInfo[playerid][pWantedLevel]--;
- WantedPoints[playerid]--;
- SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
- SetPlayerToTeamColor(playerid);
- giveplayer = GetPlayerNameEx(DefendOffer[playerid]);
- sendername = GetPlayerNameEx(playerid);
- format(string, sizeof(string), "* You accepted the Defense for $%d from Lawyer %s.",DefendPrice[playerid],giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s accepted your Defense, and the $%d was added to your money.",sendername,DefendPrice[playerid]);
- SendClientMessageEx(DefendOffer[playerid], COLOR_LIGHTBLUE, string);
- GivePlayerCash( DefendOffer[playerid],DefendPrice[playerid]);
- GivePlayerCash(playerid, -DefendPrice[playerid]);
- DefendOffer[playerid] = 999;
- DefendPrice[playerid] = 0;
- return 1;
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the Protection!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you any Protection!");
- return 1;
- }
- }
- else if(strcmp(params,"appeal",true) == 0) {
- if(AppealOffer[playerid] < 999) {
- if(IsPlayerConnected(AppealOffer[playerid])) {
- AppealOfferAccepted[playerid] = 1;
- giveplayer = GetPlayerNameEx(AppealOffer[playerid]);
- sendername = GetPlayerNameEx(playerid);
- format(string, sizeof(string), "* You accepted the appeal from Lawyer %s.",giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s accepted your appeal, a message to the Judicial System has been sent, please wait at the courtroom.",sendername);
- SendClientMessageEx(AppealOffer[playerid], COLOR_LIGHTBLUE, string);
- return 1;
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you any Protection!");
- return 1;
- }
- }
- else if(strcmp(params,"mats",true) == 0)
- {
- if(MatsOffer[playerid] < 999)
- {
- if(GetPlayerCash(playerid) >= MatsPrice[playerid])
- {
- if(IsPlayerConnected(MatsOffer[playerid]))
- {
- if(GetPVarInt(playerid, "SellMatsTimer") > 0)
- {
- format(string, sizeof(string), "You must wait %d seconds before accepting materials.", GetPVarInt(playerid, "SellMatsTimer"));
- SendClientMessageEx(playerid,COLOR_GREY,string);
- return 1;
- }
- if(PlayerInfo[MatsOffer[playerid]][pMats] < MatsAmount[playerid])
- {
- SendClientMessageEx(playerid,COLOR_GREY, "That player does not have that amount of materials anymore!");
- return 1;
- }
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(MatsOffer[playerid], ipex, sizeof(ipex));
- format(string, sizeof(string), "[MATERIALS (%d)] %s (IP:%s) has paid $%d to %s (IP:%s)", MatsAmount[playerid], GetPlayerNameEx(playerid), ip, MatsPrice[playerid], GetPlayerNameEx(MatsOffer[playerid]), ipex);
- Log("logs/pay.log", string);
- MatsWarn[playerid][MatsOffer[playerid]] += MatsPrice[playerid];
- if(MatsWarn[playerid][MatsOffer[playerid]] >= 25000 && (PlayerInfo[MatsOffer[playerid]][pLevel] <= 3 || PlayerInfo[playerid][pLevel] <= 3))
- {
- format(string, sizeof(string), "%s (IP:%s) has sold %s (IP:%s) $%d of materials in this session.", GetPlayerNameEx(MatsOffer[playerid]), ipex, GetPlayerNameEx(playerid), ip, MatsWarn[playerid][MatsOffer[playerid]]);
- ABroadCast(COLOR_YELLOW, string, 2);
- }
- format(string, sizeof(string), "* You bought %d materials for $%d from %s.", MatsAmount[playerid], MatsPrice[playerid], GetPlayerNameEx(MatsOffer[playerid]));
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s has bought your %d materials, the $%d was added to your money.", GetPlayerNameEx(playerid), MatsAmount[playerid], MatsPrice[playerid]);
- SendClientMessageEx(MatsOffer[playerid], COLOR_LIGHTBLUE, string);
- GivePlayerCash(MatsOffer[playerid], MatsPrice[playerid]);
- GivePlayerCash(playerid, -MatsPrice[playerid]);
- PlayerInfo[playerid][pMats] += MatsAmount[playerid];
- PlayerInfo[MatsOffer[playerid]][pMats] -= MatsAmount[playerid];
- MatsOffer[playerid] = 999;
- MatsPrice[playerid] = 0;
- MatsAmount[playerid] = 0;
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "You can't afford those materials!");
- return 1;
- }
- }
- else
- {
- SendClientMessageEx(playerid, COLOR_GREY, "No-one offered you any materials!");
- return 1;
- }
- }
- else if(strcmp(params,"pot",true) == 0) {
- if(PotOffer[playerid] < 999) {
- if(GetPlayerCash(playerid) > PotPrice[playerid]) {
- if(PlayerInfo[playerid][pPot] < 25) {
- if(IsPlayerConnected(PotOffer[playerid])) {
- if(PlayerInfo[PotOffer[playerid]][pPot] < PotGram[playerid])
- {
- SendClientMessageEx(playerid,COLOR_GREY, "That player does not have that amount of pot anymore!");
- return 1;
- }
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(PotOffer[playerid], ipex, sizeof(ipex));
- format(string, sizeof(string), "[POT (%d GRAMS)] %s (IP:%s) has paid $%d to %s (IP:%s)", PotGram[playerid], GetPlayerNameEx(playerid), ip, PotPrice[playerid], GetPlayerNameEx(PotOffer[playerid]), ipex);
- Log("logs/pay.log", string);
- PotWarn[playerid][PotOffer[playerid]] += PotPrice[playerid];
- if(PotWarn[playerid][PotOffer[playerid]] >= 25000 && (PlayerInfo[PotOffer[playerid]][pLevel] <= 3 || PlayerInfo[PotOffer[playerid]][pLevel] <= 3)) {
- format(string, sizeof(string), "%s (IP:%s) has sold %s (IP:%s) $%d of pot in this session.", GetPlayerNameEx(PotOffer[playerid]), ipex, GetPlayerNameEx(playerid), ip, PotWarn[playerid][PotOffer[playerid]]);
- Log("logs/pay.log", string);
- ABroadCast(COLOR_YELLOW, string, 2);
- }
- GetPlayerName(PotOffer[playerid], giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* You bought %d gram for $%d from Drug Dealer %s.",PotGram[playerid],PotPrice[playerid],giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s has bought your %d gram, the $%d was added to your money.",sendername,PotGram[playerid],PotPrice[playerid]);
- SendClientMessageEx(PotOffer[playerid], COLOR_LIGHTBLUE, string);
- ExtortionTurfsWarsZone(PotOffer[playerid], 1, PotPrice[playerid]);
- SetPVarInt(PotOffer[playerid], "Cash", GetPVarInt(PotOffer[playerid], "Cash")+PotPrice[playerid]);
- PlayerInfo[PotOffer[playerid]][pDrugsSkill] ++;
- GivePlayerCash(playerid, -PotPrice[playerid]);
- PlayerInfo[playerid][pPot] += PotGram[playerid];
- PlayerInfo[PotOffer[playerid]][pPot] -= PotGram[playerid];
- if(PlayerInfo[PotOffer[playerid]][pDrugsSkill] == 50)
- { SendClientMessageEx(PotOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 2, you can buy more Grams and Cheaper."); }
- else if(PlayerInfo[PotOffer[playerid]][pDrugsSkill] == 100)
- { SendClientMessageEx(PotOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 3, you can buy more Grams and Cheaper."); }
- else if(PlayerInfo[PotOffer[playerid]][pDrugsSkill] == 200)
- { SendClientMessageEx(PotOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 4, you can buy more Grams and Cheaper."); }
- else if(PlayerInfo[PotOffer[playerid]][pDrugsSkill] == 400)
- { SendClientMessageEx(PotOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 5, you can buy more Grams and Cheaper."); }
- PotOffer[playerid] = 999;
- PotPrice[playerid] = 0;
- PotGram[playerid] = 0;
- return 1;
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You are fully loaded with Drugs, use them first!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You can't afford those Pot!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you any Pot!");
- return 1;
- }
- }
- else if(strcmp(params,"crack",true) == 0) {
- if(CrackOffer[playerid] < 999) {
- if(GetPlayerCash(playerid) > CrackPrice[playerid]) {
- if(PlayerInfo[playerid][pCrack] < 25) {
- if(IsPlayerConnected(CrackOffer[playerid])) {
- if(PlayerInfo[CrackOffer[playerid]][pCrack] < CrackGram[playerid])
- {
- SendClientMessageEx(playerid,COLOR_GREY, "That player does not have that amount of crack anymore!");
- return 1;
- }
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(CrackOffer[playerid], ipex, sizeof(ipex));
- format(string, sizeof(string), "[CRACK DEAL (%d GRAMS)] %s (IP:%s) has paid $%d to %s (IP:%s)", CrackGram[playerid], GetPlayerNameEx(playerid), ip, CrackPrice[playerid], GetPlayerNameEx(CrackOffer[playerid]), ipex);
- Log("logs/pay.log", string);
- CrackWarn[playerid][CrackOffer[playerid]] += CrackPrice[playerid];
- if(CrackWarn[playerid][CrackOffer[playerid]] >= 25000 && (PlayerInfo[CrackOffer[playerid]][pLevel] <= 3 || PlayerInfo[CrackOffer[playerid]][pLevel] <= 3)) {
- format(string, sizeof(string), "%s (IP:%s) has sold %s (IP:%s) $%d of crack in this session.", GetPlayerNameEx(CrackOffer[playerid]), ipex, GetPlayerNameEx(playerid), ip, CrackWarn[playerid][CrackOffer[playerid]]);
- ABroadCast(COLOR_YELLOW, string, 2);
- }
- GivePlayerCash(playerid, -CrackPrice[playerid]);
- GivePlayerCash(CrackOffer[playerid], CrackPrice[playerid]);
- GetPlayerName(CrackOffer[playerid], giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* You bought %d gram for $%d from Drug Dealer %s.",CrackGram[playerid],CrackPrice[playerid],giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s has bought your %d gram, the $%d was added to your money.",sendername,CrackGram[playerid],CrackPrice[playerid]);
- SendClientMessageEx(CrackOffer[playerid], COLOR_LIGHTBLUE, string);
- ExtortionTurfsWarsZone(CrackOffer[playerid], 1, CrackPrice[playerid]);
- //SetPVarInt(CrackOffer[playerid], "Cash", GetPVarInt(CrackOffer[playerid], "Cash")+CrackOffer[playerid]);
- PlayerInfo[CrackOffer[playerid]][pDrugsSkill] ++;
- PlayerInfo[playerid][pCrack] += CrackGram[playerid];
- PlayerInfo[CrackOffer[playerid]][pCrack] -= CrackGram[playerid];
- if(PlayerInfo[CrackOffer[playerid]][pDrugsSkill] == 50)
- { SendClientMessageEx(CrackOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 2, you can buy more Grams and Cheaper."); }
- else if(PlayerInfo[CrackOffer[playerid]][pDrugsSkill] == 100)
- { SendClientMessageEx(CrackOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 3, you can buy more Grams and Cheaper."); }
- else if(PlayerInfo[CrackOffer[playerid]][pDrugsSkill] == 200)
- { SendClientMessageEx(CrackOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 4, you can buy more Grams and Cheaper."); }
- else if(PlayerInfo[CrackOffer[playerid]][pDrugsSkill] == 400)
- { SendClientMessageEx(CrackOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 5, you can buy more Grams and Cheaper."); }
- CrackOffer[playerid] = 999;
- CrackPrice[playerid] = 0;
- CrackGram[playerid] = 0;
- return 1;
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You are fully loaded with Crack, use them first!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You can't afford that Crack!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you any Crack!");
- return 1;
- }
- }
- else if(strcmp(params,"weapon",true) == 0) {
- if(GunOffer[playerid] < 999) {
- if(IsPlayerConnected(GunOffer[playerid])) {
- if (ProxDetectorS(5.0, playerid, GunOffer[playerid])) {
- if(GetPVarInt(playerid, "Hospital") == 1 || GetPVarInt(playerid, "Hospital") == 2 || GetPVarInt(playerid, "Hospital") == 3 || GetPVarInt(playerid, "Hospital") == 4 || GetPVarInt(playerid, "Hospital") == 5) {
- SendClientMessageEx(playerid, COLOR_GREY, "You can't spawn a weapon whilst in Hospital.");
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "Please exit the vehicle, before using this command.");
- new weaponname[32];
- GetWeaponName(GunId[playerid], weaponname, sizeof(weaponname));
- format(string, sizeof(string), " You have given %s, a %s.", GetPlayerNameEx(playerid),weaponname);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessageEx(GunOffer[playerid], COLOR_GRAD1, string);
- format(string, sizeof(string), " You have recieved a %s from %s.", weaponname, GetPlayerNameEx(GunOffer[playerid]));
- SendClientMessageEx(playerid, COLOR_GRAD1, string);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "* %s created a Gun from Materials, and hands it to %s.", GetPlayerNameEx(GunOffer[playerid]), GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- ExtortionTurfsWarsZone(GunOffer[playerid], 3, 1000);
- GivePlayerValidWeapon(playerid,GunId[playerid],50000);
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(GunOffer[playerid], ipex, sizeof(ipex));
- format(string, sizeof(string), "[WEAPON DEAL] %s(IP:%s) has bought a %s from %s(IP:%s)", GetPlayerNameEx(playerid), ip, weaponname, GetPlayerNameEx(GunOffer[playerid]), ipex);
- Log("logs/pay.log", string);
- PlayerInfo[GunOffer[playerid]][pMats] -= GunMats[playerid];
- if(GunId[playerid] > 15)
- {
- if(PlayerInfo[GunOffer[playerid]][pDonateRank] == 2 || PlayerInfo[GunOffer[playerid]][pDonateRank] == 3)
- {
- PlayerInfo[GunOffer[playerid]][pArmsSkill] += 2;
- }
- else
- {
- PlayerInfo[GunOffer[playerid]][pArmsSkill]++;
- }
- }
- if(PlayerInfo[GunOffer[playerid]][pArmsSkill] == 50)
- { SendClientMessageEx(GunOffer[playerid], COLOR_YELLOW, "* Your Arms Dealer Skill is now Level 2, more weapons are available to sell."); }
- else if(PlayerInfo[GunOffer[playerid]][pArmsSkill] == 100)
- { SendClientMessageEx(GunOffer[playerid], COLOR_YELLOW, "* Your Arms Dealer Skill is now Level 3, more weapons are available to sell."); }
- else if(PlayerInfo[GunOffer[playerid]][pArmsSkill] == 200)
- { SendClientMessageEx(GunOffer[playerid], COLOR_YELLOW, "* Your Arms Dealer Skill is now Level 4, more weapons are available to sell."); }
- else if(PlayerInfo[GunOffer[playerid]][pArmsSkill] == 400)
- { SendClientMessageEx(GunOffer[playerid], COLOR_YELLOW, "* Your Arms Dealer Skill is now Level 5, more weapons are available to sell."); }
- GunOffer[playerid] = 999;
- GunId[playerid] = 0;
- GunMats[playerid] = 0;
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GRAD2, "You need to be the near the player that is selling you the weapon !");
- return 1;
- }
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you a Weapon!");
- return 1;
- }
- }
- else if(strcmp(params,"craft",true) == 0) {
- if(CraftOffer[playerid] < 999) {
- if(IsPlayerConnected(CraftOffer[playerid])) {
- if (ProxDetectorS(5.0, playerid, CraftOffer[playerid])) {
- if(GetPVarInt(playerid, "Hospital") == 1 || GetPVarInt(playerid, "Hospital") == 2 || GetPVarInt(playerid, "Hospital") == 3 || GetPVarInt(playerid, "Hospital") == 4 || GetPVarInt(playerid, "Hospital") == 5) {
- SendClientMessageEx(playerid, COLOR_GREY, "You can't spawn a weapon whilst in Hospital.");
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "Please exit the vehicle, before using this command.");
- new weaponname[50];
- format(weaponname, 50, "%s", CraftName[playerid]);
- switch(CraftId[playerid]) {
- case 1:
- {
- PlayerInfo[playerid][pScrewdriver]++;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/sellgun");
- }
- case 2:
- {
- PlayerInfo[playerid][pSmslog]++;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/smslog");
- }
- case 3:
- {
- PlayerInfo[playerid][pWristwatch]++;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/wristwatch");
- }
- case 4:
- {
- PlayerInfo[playerid][pSurveillance]++;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/(p)lace(c)amera /(s)ee(c)amera /(d)estroy(c)amera");
- }
- case 5:
- {
- PlayerInfo[playerid][pTire]++;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/repair");
- }
- case 6:
- {
- PlayerInfo[playerid][pLock]=1;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/lock");
- }
- case 7:
- {
- PlayerInfo[playerid][pFirstaid]++;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/firstaid");
- }
- case 8:
- {
- GivePlayerValidWeapon(playerid, 43, 50);
- }
- case 9:
- {
- PlayerInfo[playerid][pRccam]++;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/rccam");
- }
- case 10:
- {
- PlayerInfo[playerid][pReceiver]++;
- SetPVarInt(playerid, "pReceiverMLeft", 30);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You will receive the next thirty non-encrpyted department radio messages.");
- }
- case 11:
- {
- PlayerInfo[playerid][pGPS]++;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/gps");
- }
- case 12:
- {
- PlayerInfo[playerid][pSweep]++;
- PlayerInfo[playerid][pSweepLeft] = 3;
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/sweep");
- }
- case 13:
- {
- GivePlayerValidWeapon(playerid, 46, 99999);
- }
- }
- format(string, sizeof(string), " You have given %s, a %s.", GetPlayerNameEx(playerid),weaponname);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessageEx(CraftOffer[playerid], COLOR_GRAD1, string);
- format(string, sizeof(string), " You have recieved a %s from %s.", weaponname, GetPlayerNameEx(CraftOffer[playerid]));
- SendClientMessageEx(playerid, COLOR_GRAD1, string);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "* %s created something from Materials, and hands it to %s.", GetPlayerNameEx(CraftOffer[playerid]), GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(CraftOffer[playerid], ipex, sizeof(ipex));
- format(string, sizeof(string), "[CRAFTSMAN DEAL] %s (IP: %s) has bought a %s from %s (IP: %s)", GetPlayerNameEx(playerid), ip, weaponname, GetPlayerNameEx(CraftOffer[playerid]), ipex);
- Log("logs/pay.log", string);
- PlayerInfo[CraftOffer[playerid]][pMats] -= CraftMats[playerid];
- PlayerInfo[CraftOffer[playerid]][pArmsSkill]++;
- CraftOffer[playerid] = 999;
- CraftId[playerid] = 0;
- CraftMats[playerid] = 0;
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GRAD2, "You need to be the near the player that is selling you the weapon !");
- return 1;
- }
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you a Weapon!");
- return 1;
- }
- }
- else if(strcmp(params,"contract",true) == 0) {
- if(HitOffer[playerid] < 999) {
- if(HitToGet[playerid] < 999) {
- if(IsPlayerConnected(HitToGet[playerid])) {
- format(string, sizeof(string), "* %s has accepted the contract to kill %s.", GetPlayerNameEx(playerid),GetPlayerNameEx(HitToGet[playerid]));
- SendClientMessageEx(HitOffer[playerid], COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* You have accepted the contract to kill %s, you will recieve $%d when completed.", GetPlayerNameEx(HitToGet[playerid]), PlayerInfo[HitToGet[playerid]][pHeadValue] / 4 * 2);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "%s has been assigned to the contract on %s, for $%d.", GetPlayerNameEx(playerid), GetPlayerNameEx(HitToGet[playerid]), PlayerInfo[HitToGet[playerid]][pHeadValue] / 4 * 2);
- SendFamilyMessage(8, COLOR_YELLOW, string);
- GoChase[playerid] = HitToGet[playerid];
- GetChased[HitToGet[playerid]] = playerid;
- GotHit[HitToGet[playerid]] = 1;
- HitToGet[playerid] = 999;
- HitOffer[playerid] = 999;
- return 1;
- }
- else {
- HitToGet[playerid] = 999;
- HitOffer[playerid] = 999;
- return 1;
- }
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you a contract!");
- return 1;
- }
- }
- else if(strcmp(params,"sex",true) == 0) {
- if(SexOffer[playerid] < 999) {
- if(GetPlayerCash(playerid) > SexPrice[playerid]) {
- if (IsPlayerConnected(SexOffer[playerid])) {
- new Car = GetPlayerVehicleID(playerid);
- if(IsPlayerInAnyVehicle(playerid) && IsPlayerInVehicle(SexOffer[playerid], Car)) {
- GetPlayerName(SexOffer[playerid], giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* You had sex with Whore %s, for $%d.", giveplayer, SexPrice[playerid]);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* %s had sex with you. You have earned $%d.", sendername, SexPrice[playerid]);
- SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, string);
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(SexOffer[playerid], ipex, sizeof(ipex));
- format(string, sizeof(string), "[SEX] %s (IP:%s) had sex with %s (IP:%s) for %d.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(SexOffer[playerid]), ipex, SexPrice[playerid]);
- Log("logs/pay.log", string);
- SexWarn[playerid][SexOffer[playerid]] += SexPrice[playerid];
- if(SexWarn[playerid][SexOffer[playerid]] >= 25000 && (PlayerInfo[SexOffer[playerid]][pLevel] <= 3 || PlayerInfo[playerid][pLevel] <= 3)) {
- format(string, sizeof(string), "%s (IP:%s) has guarded %s (IP:%s) $%d in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(SexOffer[playerid]), ipex, SexWarn[playerid][SexOffer[playerid]]);
- Log("logs/pay.log", string);
- ABroadCast(COLOR_YELLOW, string, 2);
- }
- ExtortionTurfsWarsZone(SexOffer[playerid], 4, SexPrice[playerid]);
- GivePlayerCash(SexOffer[playerid], SexPrice[playerid]);
- GivePlayerCash(playerid, -SexPrice[playerid]);
- PlayerInfo[SexOffer[playerid]][pSexSkill] ++;
- if(PlayerInfo[SexOffer[playerid]][pSexSkill] == 50) {
- SendClientMessageEx(SexOffer[playerid], COLOR_YELLOW, "* Your Sex Skill is now Level 2, you offer better Sex (health) and less chance on STI.");
- }
- else if(PlayerInfo[SexOffer[playerid]][pSexSkill] == 100) {
- SendClientMessageEx(SexOffer[playerid], COLOR_YELLOW, "* Your Sex Skill is now Level 3, you offer better Sex (health) and less chance on STI.");
- }
- else if(PlayerInfo[SexOffer[playerid]][pSexSkill] == 200) {
- SendClientMessageEx(SexOffer[playerid], COLOR_YELLOW, "* Your Sex Skill is now Level 4, you offer better Sex (health) and less chance on STI.");
- }
- else if(PlayerInfo[SexOffer[playerid]][pSexSkill] == 400) {
- SendClientMessageEx(SexOffer[playerid], COLOR_YELLOW, "* Your Sex Skill is now Level 5, you offer better Sex (health) and less chance on STI.");
- }
- if(STDPlayer[playerid] == 0) {
- if(Condom[playerid] < 1) {
- new Float:health;
- new level = PlayerInfo[SexOffer[playerid]][pSexSkill];
- if(level >= 0 && level <= 50) {
- GetPlayerHealth(playerid, health);
- if(health < 100) {
- if(health > 90) {
- SetPlayerHealth(playerid, 100);
- }
- else {
- SetPlayerHealth(playerid, health + 10.0);
- }
- }
- new rand = random(sizeof(STD1));
- STDPlayer[playerid] = STD1[rand];
- STDPlayer[SexOffer[playerid]] = STD1[rand];
- if(STD1[rand] == 0) {
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 10 Health + no STI while having Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You haven't got a STI while having Sex.");
- }
- else if(STD1[rand] == 1) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 10 Health + a Chlamydia because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Chlamydia because of the Sex."); }
- else if(STD1[rand] == 2) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 10 Health + a Gonorrhea because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Gonorrhea because of the Sex."); }
- else if(STD1[rand] == 3) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 10 Health + a Syphilis because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Syphilis because of the Sex."); }
- }
- else if(level >= 51 && level <= 100) {
- GetPlayerHealth(playerid, health);
- if(health < 100) {
- if(health > 80) {
- SetPlayerHealth(playerid, 100);
- }
- else {
- SetPlayerHealth(playerid, health + 20.0);
- }
- }
- new rand = random(sizeof(STD2));
- STDPlayer[playerid] = STD2[rand];
- STDPlayer[SexOffer[playerid]] = STD2[rand];
- if(STD2[rand] == 0) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 20 Health + no STD while having Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You haven't got a STI while having Sex."); }
- else if(STD2[rand] == 1) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 20 Health + a Chlamydia because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Chlamydia because of the Sex."); }
- else if(STD2[rand] == 2) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 20 Health + a Gonorrhea because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Gonorrhea because of the Sex."); }
- else if(STD2[rand] == 3) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 20 Health + a Syphilis because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Syphilis because of the Sex."); }
- }
- else if(level >= 101 && level <= 200) {
- GetPlayerHealth(playerid, health);
- if(health < 100) {
- if(health > 70) {
- SetPlayerHealth(playerid, 100);
- }
- else {
- SetPlayerHealth(playerid, health + 30.0);
- }
- }
- new rand = random(sizeof(STD3));
- STDPlayer[playerid] = STD3[rand];
- STDPlayer[SexOffer[playerid]] = STD3[rand];
- if(STD3[rand] == 0) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 30 Health + no STI while having Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You haven't got a STI while having Sex."); }
- else if(STD3[rand] == 1) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 30 Health + a Chlamydia because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Chlamydia because of the Sex."); }
- else if(STD3[rand] == 2) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 30 Health + a Gonorrhea because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Gonorrhea because of the Sex."); }
- else if(STD3[rand] == 3) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 30 Health + a Syphilis because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Syphilis because of the Sex."); }
- }
- else if(level >= 201 && level <= 400) {
- GetPlayerHealth(playerid, health);
- if(health < 100) {
- if(health > 60) {
- SetPlayerHealth(playerid, 100);
- }
- else {
- SetPlayerHealth(playerid, health + 40.0);
- }
- }
- new rand = random(sizeof(STD4));
- STDPlayer[playerid] = STD4[rand];
- STDPlayer[SexOffer[playerid]] = STD4[rand];
- if(STD4[rand] == 0) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 40 Health + no STI while having Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You haven't got a STI while having Sex."); }
- else if(STD4[rand] == 1) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 40 Health + a Chlamydia because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Chlamydia because of the Sex."); }
- else if(STD4[rand] == 2) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 40 Health + a Gonorrhea because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Gonorrhea because of the Sex."); }
- else if(STD4[rand] == 3) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 40 Health + a Syphilis because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Syphilis because of the Sex."); }
- }
- else if(level >= 401) {
- GetPlayerHealth(playerid, health);
- if(health > 50) {
- SetPlayerHealth(playerid, 100);
- }
- else {
- SetPlayerHealth(playerid, health + 50.0);
- }
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Your Sex Skill Level is so high you gave high health and No STD.");
- SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* The Whore's Sex Skill Level is so high you got high health and No STD.");
- }
- }
- else {
- SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* The player used a Condom.");
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You used a Condom.");
- Condom[playerid] --;
- }
- }
- else {
- SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* That player was already infected with a STI, can't get another one.");
- return 1;
- }
- SexOffer[playerid] = 999;
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You or the Whore are not both in a Car!");
- return 1;
- }
- } //Connected or not
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the Sex!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You Don't have any Sex Offered by a Whore!");
- return 1;
- }
- }
- else if(strcmp(params,"repair",true) == 0) {
- if(RepairOffer[playerid] < 999) {
- if(GetPlayerCash(playerid) > RepairPrice[playerid]) {
- if(IsPlayerInAnyVehicle(playerid)) {
- if(IsPlayerConnected(RepairOffer[playerid])) {
- GetPlayerName(RepairOffer[playerid], giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- RepairCar[playerid] = GetPlayerVehicleID(playerid);
- RepairVehicle(RepairCar[playerid]);
- PlayerInfo[RepairOffer[playerid]][pTire]--;
- GivePlayerCash(RepairOffer[playerid], RepairPrice[playerid]);
- GivePlayerCash(playerid, -RepairPrice[playerid]);
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(RepairOffer[playerid], ipex, sizeof(ipex));
- format(string, sizeof(string), "%s(IP:%s) has repaired the vehicle from %s(IP:%s) for $%d", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(RepairOffer[playerid]), ipex, RepairPrice[playerid]);
- Log("logs/pay.log", string);
- format(string, sizeof(string), "* %s has repaired %s's vehicle.", giveplayer, GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- format(string, sizeof(string), "* You repaired your car for $%d by Car Mechanic %s.",RepairPrice[playerid],giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- RepairWarn[playerid][RepairOffer[playerid]] += RepairPrice[playerid];
- if(RepairWarn[playerid][RepairOffer[playerid]] >= 25000 && (PlayerInfo[RepairOffer[playerid]][pLevel] <= 3 || PlayerInfo[RepairOffer[playerid]][pLevel] <= 3)) {
- format(string, sizeof(string), "%s (IP:%s) has repaired %s (IP:%s) $%d in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(RepairOffer[playerid]), ipex, RepairWarn[playerid][RepairOffer[playerid]]);
- Log("logs/pay.log", string);
- ABroadCast(COLOR_YELLOW, string, 2);
- }
- format(string, sizeof(string), "* You fixed %s's car, the $%d has been added to your money on hand!",sendername,RepairPrice[playerid]);
- SendClientMessageEx(RepairOffer[playerid], COLOR_LIGHTBLUE, string);
- PlayerInfo[RepairOffer[playerid]][pMechSkill] ++;
- RepairOffer[playerid] = 999;
- RepairPrice[playerid] = 0;
- return 1;
- }
- return 1;
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the Repair!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you to Repair your Car!");
- return 1;
- }
- }
- else if(strcmp(params,"refill",true) == 0) {
- if(RefillOffer[playerid] < 999) {
- if(GetPlayerCash(playerid) > RefillPrice[playerid]) {
- if(IsPlayerInAnyVehicle(playerid)) {
- if(IsPlayerConnected(RefillOffer[playerid])) {
- new Float:fueltogive;
- new level = PlayerInfo[RefillOffer[playerid]][pMechSkill];
- if(level >= 0 && level < 50) { fueltogive = 10.0; }
- else if(level >= 50 && level < 100) { fueltogive = 20.0; }
- else if(level >= 100 && level < 200) { fueltogive = 30.0; }
- else if(level >= 200 && level < 400) { fueltogive = 40.0; }
- else if(level >= 400) { fueltogive = 50.0; }
- GetPlayerName(RefillOffer[playerid], giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new vehicleid = GetPlayerVehicleID(playerid);
- VehicleFuel[vehicleid] = floatadd(VehicleFuel[vehicleid], fueltogive);
- if(VehicleFuel[vehicleid] > 100.0) VehicleFuel[vehicleid] = 100.0;
- GivePlayerCash(RefillOffer[playerid], RefillPrice[playerid]);
- GivePlayerCash(playerid, -RefillPrice[playerid]);
- new ip[32], ipex[32];
- GetPlayerIp(playerid, ip, sizeof(ip));
- GetPlayerIp(RefillOffer[playerid], ipex, sizeof(ipex));
- format(string, sizeof(string), "%s(IP:%s) has refilled the vehicle from %s(IP:%s) for $%d", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(RefillOffer[playerid]), ipex, RefillPrice[playerid]);
- Log("logs/pay.log", string);
- format(string, sizeof(string), "* %s has refilled %s's vehicle.", giveplayer, GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- format(string, sizeof(string), "* You have added %.2f fuel to your car for $%d by Car Mechanic %s.",fueltogive,RefillPrice[playerid],giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* You added %.2f fuel to %s's car, the $%d has been added to your money on hand!",fueltogive,sendername,RefillPrice[playerid]);
- SendClientMessageEx(RefillOffer[playerid], COLOR_LIGHTBLUE, string);
- PlayerInfo[RefillOffer[playerid]][pMechSkill] ++;
- RefillWarn[playerid][RefillOffer[playerid]] += RefillPrice[playerid];
- if(RefillWarn[playerid][RefillOffer[playerid]] >= 30000 && (PlayerInfo[playerid][pLevel] <= 3 || PlayerInfo[RefillOffer[playerid]][pLevel] <= 3)) {
- format(string, sizeof(string), "%s (IP:%s) has refueled %s (IP:%s) $%d in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(RefillOffer[playerid]), ipex, RefillWarn[playerid][RefillOffer[playerid]]);
- Log("logs/pay.log", string);
- ABroadCast(COLOR_YELLOW, string, 2);
- }
- RefillOffer[playerid] = 999;
- RefillPrice[playerid] = 0;
- return 1;
- }
- return 1;
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the refill!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you to refill your Car!");
- return 1;
- }
- }
- else if(strcmp(params,"refuel",true) == 0) {
- if(RefuelOffer[playerid] < 999) {
- if(GetPlayerCash(playerid) > RefuelPrice[playerid]) {
- if(IsPlayerInAnyVehicle(playerid)) {
- if(IsPlayerConnected(RefuelOffer[playerid])) {
- new fuel;
- GetPlayerName(RefuelOffer[playerid], giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new vehicleid = GetPlayerVehicleID(playerid);
- VehicleFuel[vehicleid] = floatadd(VehicleFuel[vehicleid], fuel);
- if(VehicleFuel[vehicleid] > 100.0) VehicleFuel[vehicleid] = 100.0;
- GivePlayerCash(RefillOffer[playerid], RefuelPrice[playerid]);
- GivePlayerCash(playerid, -RefuelPrice[playerid]);
- format(string, sizeof(string), "* %s has refueled %s's vehicle.", giveplayer, GetPlayerNameEx(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- format(string, sizeof(string), "* You have added %d fuel to your car for $%d by Car Mechanic %s.",fuel,RefuelPrice[playerid],giveplayer);
- SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* You added %d fuel to %s's car, the $%d has been added to your money on hand!",fuel,sendername,RefuelPrice[playerid]);
- SendClientMessageEx(RefillOffer[playerid], COLOR_LIGHTBLUE, string);
- RefuelOffer[playerid] = 999;
- RefuelPrice[playerid] = 0;
- return 1;
- }
- return 1;
- }
- return 1;
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the refuel!");
- return 1;
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you to refuel your Car!");
- return 1;
- }
- }
- else { return 1; }
- //} //not connected
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment