Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case CP_TYPE_HOUSE:
- {
- if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Houses Are Temporary Disabled Due To Bug Fixing. Sorry For Any Inconvienence This May Have Caused You.");
- SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "Type /house Or Press The SUB-MISSION Button For House Options.");
- SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "Type /houserob To Rob This House");
- PlayerInfo[playerid][pLastOutSideID] = Houseid;
- GetPlayerPos(playerid, PlayerInfo[playerid][pLastOutSideX],PlayerInfo[playerid][pLastOutSideY],PlayerInfo[playerid][pLastOutSideZ]);
- SetPlayerPosEx(playerid,HouseInfo[Houseid][h_entry_x],HouseInfo[Houseid][h_entry_y],HouseInfo[Houseid][h_entry_z],HouseInfo[Houseid][h_entry_a],HouseInfo[Houseid][h_entry_i],HouseInfo[Houseid][h_entry_w]);
- if (HouseData[Houseid][h_OwnerID] == playerid)
- {
- PlayerInfo[playerid][pLastOutSideID] = Houseid;
- HouseData[Houseid][h_OwnerVisits] ++;
- GetPlayerPos(playerid, PlayerInfo[playerid][pLastOutSideX],PlayerInfo[playerid][pLastOutSideY],PlayerInfo[playerid][pLastOutSideZ]);
- SetPlayerPosEx(playerid,HouseInfo[Houseid][h_entry_x],HouseInfo[Houseid][h_entry_y],HouseInfo[Houseid][h_entry_z],HouseInfo[Houseid][h_entry_a],HouseInfo[Houseid][h_entry_i],HouseInfo[Houseid][h_entry_w]);
- SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "Type /house For House Info And Options.");
- format(string, sizeof(string), "%s",HouseInfo[Houseid][h_HouseIntName]);
- strmid(PlayerInfo[playerid][pInteriorName], string, 0, strlen(string), 256);
- format(string, sizeof(string), "%s",HouseInfo[Houseid][h_HouseExtName]);
- strmid(PlayerInfo[playerid][pExteriorName], string, 0, strlen(string), 256);
- format(string, sizeof(string), "%s In %s",PlayerInfo[playerid][pInteriorName],PlayerInfo[playerid][pExteriorName]);
- strmid(PlayerInfo[playerid][pLocation], string, 0, strlen(string), 256);
- TextDrawSetString(ZoneName[playerid], string);
- }else{
- if (HouseData[Houseid][h_OwnerID] == -1)
- {
- ShowTextDrawMenu(playerid, TD_MENU_HOUSE,"~g~House", 10, 6);
- format(string, sizeof(string), "~p~%s~n~~w~Owner: ~b~%s~n~~w~For Sale ~g~$%d",HouseInfo[Houseid][h_HouseIntName],HouseData[Houseid][h_OwnerName],HouseData[Houseid][h_Value]);
- ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
- ShowTextDrawMenuItems(playerid, 1, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 2, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 3, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 4, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 5, " ", "~y~1 ~w~- Enter This House", " " ,0);
- ShowTextDrawMenuItems(playerid, 6, " ", "~y~2 ~w~- Knock At The Door", " " ,0);
- ShowTextDrawMenuItems(playerid, 7, " ", "~y~3 ~w~- Attempt To Break In", " " ,0);
- ShowTextDrawMenuItems(playerid, 8, " ", "~y~4 ~w~- Visit This House", " " ,0);
- ShowTextDrawMenuItems(playerid, 9, " ", "~y~5 ~w~- Purchase This House", " " ,0);
- ShowTextDrawMenuItems(playerid, 10, " ", "~y~6 ~w~- Rent This House", " " ,0);
- }else{
- ShowTextDrawMenu(playerid, TD_MENU_HOUSE,"~g~House", 10, 6);
- if (HouseData[Houseid][h_Rent] == 0)
- {
- format(string, sizeof(string), "~p~%s~n~~w~Owner: ~b~%s",HouseInfo[Houseid][h_HouseIntName],HouseData[Houseid][h_OwnerName]);
- }else{
- format(string, sizeof(string), "~p~%s~n~~w~Owner: ~b~%s~n~~w~For Rent ~g~$%d ~w~/ Day",HouseInfo[Houseid][h_HouseIntName],HouseData[Houseid][h_OwnerName],HouseData[Houseid][h_Rent]);
- }
- ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
- ShowTextDrawMenuItems(playerid, 1, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 2, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 3, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 4, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 5, " ", "~y~1 ~w~- Enter This House", " " ,0);
- ShowTextDrawMenuItems(playerid, 6, " ", "~y~2 ~w~- Knock At The Door", " " ,0);
- ShowTextDrawMenuItems(playerid, 7, " ", "~y~3 ~w~- Attempt To Break In", " " ,0);
- ShowTextDrawMenuItems(playerid, 8, " ", "~y~4 ~w~- Visit This House", " " ,0);
- ShowTextDrawMenuItems(playerid, 9, " ", "~y~5 ~w~- Purchase This House", " " ,0);
- ShowTextDrawMenuItems(playerid, 10, " ", "~y~6 ~w~- Rent This House", " " ,0);
- }
- }
- }
- }
- case CP_TYPE_POLICE:
- {
- if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- if (PlayerInfo[playerid][pTeam] == TEAM_LAW || PlayerInfo[playerid][pVigilante] == 1)
- {
- PlayerInfo[playerid][pLastOutSideID] = Houseid;
- GetPlayerPos(playerid, PlayerInfo[playerid][pLastOutSideX],PlayerInfo[playerid][pLastOutSideY],PlayerInfo[playerid][pLastOutSideZ]);
- SetPlayerPosEx(playerid,HouseInfo[Houseid][h_entry_x],HouseInfo[Houseid][h_entry_y],HouseInfo[Houseid][h_entry_z],HouseInfo[Houseid][h_entry_a],HouseInfo[Houseid][h_entry_i],HouseInfo[Houseid][h_entry_w]);
- format(string, sizeof(string), "%s",HouseInfo[Houseid][h_HouseIntName]);
- strmid(PlayerInfo[playerid][pInteriorName], string, 0, strlen(string), 256);
- format(string, sizeof(string), "%s",HouseInfo[Houseid][h_HouseExtName]);
- strmid(PlayerInfo[playerid][pExteriorName], string, 0, strlen(string), 256);
- format(string, sizeof(string), "%s In %s",PlayerInfo[playerid][pInteriorName],PlayerInfo[playerid][pExteriorName]);
- strmid(PlayerInfo[playerid][pLocation], string, 0, strlen(string), 256);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Civilians Cannot Enter This Location.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement