Advertisement
Guest User

enterhouse

a guest
Dec 9th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. case 0:
  2. {
  3. new House = GetPVarInt(playerid,"VisitedHouse");
  4. if(strmatch("None",Houses[House][hOwner]) || Houses[House][hSalePrice] != 0)
  5. {
  6. SetPlayerPosEx(playerid, Houses[House][heX], Houses[House][heY], Houses[House][heZ]);
  7. SetPlayerInterior(playerid, Houses[House][hInteriorID]);
  8. if(Houses[House][hInteriorID] == 12) { SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); }
  9. else if(Houses[House][hInteriorID] != 26 && Houses[House][hInteriorID] != 28 && Houses[House][hInteriorID] != 12) SetPlayerVirtualWorld(playerid, Houses[House][hId]);
  10. else SetPlayerVirtualWorld(playerid, 0);
  11. 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]);
  12. SendClientMessage(playerid, COLOR_WHITE,string);
  13. SetPVarInt(playerid,"VisitingHouse",House);
  14. }
  15. else
  16. {
  17. switch(Houses[House][hAllowGuests])
  18. {
  19. case 0: //Not accepting guests.
  20. {
  21. new string[80]; format(string,sizeof(string),"%s is currently not accepting guests at the moment.",Houses[House][hOwner]);
  22. SendClientMessage(playerid, COLOR_RED,string);
  23. }
  24. case 1: //Accepting Guests with a password
  25. {
  26. 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]);
  27. ShowPlayerDialog(playerid,ENTERHOUSEPASSWORD,DIALOG_STYLE_INPUT,"House Password",string,"Enter","Back");
  28. }
  29. case 2: //Accepting Guests without a password.
  30. {
  31. SetPlayerPosEx(playerid, Houses[House][heX], Houses[House][heY], Houses[House][heZ]);
  32. SetPlayerInterior(playerid, Houses[House][hInteriorID]);
  33. if(Houses[House][hInteriorID] != 26 && Houses[House][hInteriorID] != 28) SetPlayerVirtualWorld(playerid, Houses[House][hId]);
  34. new string[120]; format(string,sizeof(string),"You have entered %s's house located in the %s region.",Houses[House][hOwner],Houses[House][hLocation]);
  35. SendClientMessage(playerid, COLOR_WHITE,string);
  36. SetPVarInt(playerid,"VisitingHouse",House);
  37. }
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement