Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1.  
  2. #include <a_samp>
  3. #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  4.  
  5. new robcasino;
  6.  
  7. forward RobAgain2();
  8. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  9.  
  10. #define COLOR_DODGERBLUE 0x1E90FFAA
  11. #define COLOR_ERROR 0xD2691EAA
  12. #define COLOR_SYSTEM 0x9ACD32AA
  13.  
  14. main()
  15. {
  16. print("\n----------------------------------");
  17. print(" Blank Gamemode by your name here");
  18. print("----------------------------------\n");
  19. }
  20.  
  21.  
  22.  
  23. public OnGameModeInit()
  24. {
  25. SetTimer("RobAgain2",1800000,1);
  26. return 1;
  27. }
  28.  
  29. public OnPlayerCommandText(playerid, cmdtext[])
  30. {
  31. dcmd(robcasino,9,cmdtext);
  32. return 0;
  33. }
  34.  
  35. dcmd_robcasino(playerid, params[])
  36. {
  37. if(PlayerToPoint(3, playerid, 1141.822509,9.046521,1000.671875))
  38. {
  39. SetTimer("robtimer",40000,false);
  40. new id = strval(params);
  41. new name[24],pname[24],string[256],reason[24];
  42. GetPlayerName( playerid, name, 24 );
  43. GetPlayerName( id, pname, 24 );
  44. format(string,sizeof(string),"%s Has begin to rob the casino",name,pname,reason);
  45. SendClientMessageToAll(COLOR_SYSTEM,string);
  46. }
  47.  
  48. return 1;
  49. }
  50.  
  51. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  52. {
  53. if(IsPlayerConnected(playerid))
  54. {
  55. new Float:oldposx, Float:oldposy, Float:oldposz;
  56. new Float:tempposx, Float:tempposy, Float:tempposz;
  57. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  58. tempposx = (oldposx -x);
  59. tempposy = (oldposy -y);
  60. tempposz = (oldposz -z);
  61. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  62. {
  63. return 1;
  64. }
  65. }
  66. return 0;
  67. }
  68.  
  69.  
  70. public OnPlayerPickUpPickup(playerid, pickupid)
  71. {
  72. if(pickupid == robcasino)
  73. {
  74. GameTextForPlayer(playerid,"~w~Type /robcasino.",5000,5);
  75. }
  76. return 1;
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement