Advertisement
Danch0

First FS

Dec 20th, 2012
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. #define FILTERSCRIPT
  5. #if defined FILTERSCRIPT
  6.  
  7. #define VERSION "V1.0"
  8.  
  9. #define COLOR_RED 0xFF0000FF
  10. #define COLOR_GREEN 0x00FF00FF
  11.  
  12. new RoadBlockDeployed[MAX_PLAYERS];
  13. new PlayerRB[MAX_PLAYERS];
  14.  
  15. public OnFilterScriptInit()
  16. {
  17. print("\n |----------------------------------|");
  18. printf(" | * Yordan's Sell House System %s * |", VERSION);
  19. print(" |----------------------------------|\n");
  20. return 1;
  21. }
  22.  
  23. public OnFilterScriptExit()
  24. {
  25. return 1;
  26. }
  27.  
  28. public OnPlayerDisconnect(playerid, reason)
  29. {
  30. RoadBlockDeployed[playerid] = 0;
  31. DestroyObject(PlayerRB[playerid]);
  32. return 1;
  33. }
  34.  
  35. #endif
  36.  
  37. CMD:shouse(playerid, params[])
  38. {
  39. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be a Administrator to use this command!");
  40.  
  41. if(RoadBlockDeployed[playerid] == 0)
  42. {
  43. new Float:x, Float:y, Float:z;
  44. GetPlayerPos(playerid, x, y, z);
  45. new Float:angle;
  46. GetPlayerFacingAngle(playerid, angle);
  47. RoadBlockDeployed[playerid] = 1;
  48. SendClientMessage(playerid, COLOR_GREEN, "Sell House deployed successfully, Destroy it using - /destroysh");
  49. PlayerRB[playerid] = CreateObject(19470, x, y, z-1.0, 0, 0, angle);
  50. SetPlayerPos(playerid, x, y, z+1);
  51. }
  52. else
  53. {
  54. SendClientMessage(playerid, COLOR_RED, "You already have a deployed House Tabel, Please destroy it - /destroysh");
  55. }
  56. return 1;
  57. }
  58.  
  59. CMD:destroysh(playerid, params[])
  60. {
  61. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be a Administrator to use this command!");
  62.  
  63. if(RoadBlockDeployed[playerid] == 1)
  64. {
  65. RoadBlockDeployed[playerid] = 0;
  66. SendClientMessage(playerid, COLOR_GREEN, "Sell House Tabel destroyed successfully");
  67. DestroyObject(PlayerRB[playerid]);
  68. }
  69. else
  70. {
  71. SendClientMessage(playerid, COLOR_RED, "There isn't a valid Sell House Tabel to destroy");
  72. }
  73. return 1;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement