Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. #define FILTERSCRIPT
  2. #include <a_samp>
  3. #include <a_npc.inc>
  4. #if defined FILTERSCRIPT
  5.  
  6. //------------------------------------------------
  7.  
  8. new Float:x, Float:y, Float:z;
  9. new o, u = 0;
  10. forward tempo();
  11.  
  12. //------------------------------------------------
  13.  
  14. public OnFilterScriptInit()
  15. {
  16. return 1;
  17. }
  18.  
  19. public OnFilterScriptExit()
  20. {
  21. return 1;
  22. }
  23.  
  24. public OnPlayerConnect(playerid)
  25. {
  26. CreateVehicle(402, -332,-1462,16, 0, 1, 2, 0, 1);
  27. return 1;
  28. }
  29.  
  30. public OnPlayerDisconnect(playerid, reason)
  31. {
  32. return 1;
  33. }
  34.  
  35. public OnPlayerCommandText(playerid, cmdtext[])
  36. {
  37. if ( u == 0 || u == 50000 ){
  38. if (strcmp("/plantar", cmdtext, true, 10) == 0)
  39. {
  40. GetPlayerPos(playerid, x, y, z);
  41. if ( x >= -336 && x <= -210 && y <= -1465 && y >= -1559 ){
  42. o = CreateObject(741, x, y, z-1, 0.0, 0.0, 0.0);
  43. SendClientMessage(playerid, -1, "{00FF00}Você acaba de plantar uma maconha!");
  44. SetTimer("tempo", 10000, false);
  45. u = SetTimer("t", 50000, false);
  46. }else{
  47. SendClientMessage(playerid, -1, "{FF0000}[ERRO] Você não está na area de plantação!");
  48. }
  49. return 1;
  50. }
  51. }else{
  52. SendClientMessage(playerid, -1, "{FF0000}[ERRO] Espere 50 segundos para plantar novamente!");
  53. }
  54. return 0;
  55. }
  56.  
  57. public tempo()
  58. {
  59. DestroyObject(o);
  60. CreateObject(644, x, y, z-1, 0.0, 0.0, 0.0);
  61. }
  62.  
  63. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement