Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 0:
- {
- new House = GetPVarInt(playerid,"VisitedHouse");
- if(strmatch("None",Houses[House][hOwner]) || Houses[House][hSalePrice] != 0)
- {
- SetPlayerPosEx(playerid, Houses[House][heX], Houses[House][heY], Houses[House][heZ]);
- SetPlayerInterior(playerid, Houses[House][hInteriorID]);
- if(Houses[House][hInteriorID] == 12) { SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); }
- else if(Houses[House][hInteriorID] != 26 && Houses[House][hInteriorID] != 28 && Houses[House][hInteriorID] != 12) SetPlayerVirtualWorld(playerid, Houses[House][hId]);
- else SetPlayerVirtualWorld(playerid, 0);
- new string[100]; format(string,sizeof(string),"This house is for sale for the price of {33AA33}%s{FFFFFF}, Vehicle Slots: {FF9900}%d",FormatMoney(Houses[House][hPrice]),Houses[House][hSlots]);
- SendClientMessage(playerid, COLOR_WHITE,string);
- SetPVarInt(playerid,"VisitingHouse",House);
- }
- else
- {
- switch(Houses[House][hAllowGuests])
- {
- case 0: //Not accepting guests.
- {
- new string[80]; format(string,sizeof(string),"%s is currently not accepting guests at the moment.",Houses[House][hOwner]);
- SendClientMessage(playerid, COLOR_RED,string);
- }
- case 1: //Accepting Guests with a password
- {
- new string[130]; format(string,sizeof(string),"%s is currently accepting guests if you have the password\nEnter the password below to enter the house",Houses[House][hOwner]);
- ShowPlayerDialog(playerid,ENTERHOUSEPASSWORD,DIALOG_STYLE_INPUT,"House Password",string,"Enter","Back");
- }
- case 2: //Accepting Guests without a password.
- {
- SetPlayerPosEx(playerid, Houses[House][heX], Houses[House][heY], Houses[House][heZ]);
- SetPlayerInterior(playerid, Houses[House][hInteriorID]);
- if(Houses[House][hInteriorID] != 26 && Houses[House][hInteriorID] != 28) SetPlayerVirtualWorld(playerid, Houses[House][hId]);
- new string[120]; format(string,sizeof(string),"You have entered %s's house located in the %s region.",Houses[House][hOwner],Houses[House][hLocation]);
- SendClientMessage(playerid, COLOR_WHITE,string);
- SetPVarInt(playerid,"VisitingHouse",House);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement