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;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment