Advertisement
Y_Less

y_areas test

Jul 6th, 2012
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.16 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6.  
  7. #include <YSI\y_groups>
  8.  
  9. #include <YSI\y_areas>
  10. #include <YSI\y_timers>
  11. #include <YSI\y_classes>
  12.  
  13. //#define GROUP_LIBRARY_NAME<%0...%1> %0User%1
  14. //#define GROUP_LIBRARY_SIZE 100
  15.  
  16. //#include <YSI\y_groups>
  17.  
  18. new gBox;
  19.  
  20. ptask Rads[1000](playerid)
  21. {
  22.     SendClientMessage(playerid, 0xFFFFFFAA, "RADS");
  23. //  new Float:x, Float:y, Float:z, str[32];
  24. //  GetPlayerPos(playerid, x, y, z);
  25.     //format(str, sizeof (str), "%.2f %.2s
  26. //  printf("%f %f", x, y);
  27.     if (Area_GetPlayerArea(playerid) == gBox)
  28.     {
  29.         SendClientMessage(playerid, 0xFFFFFFAA, "IN");
  30.     }
  31. }
  32.  
  33. main()
  34. {
  35.     print("\n----------------------------------");
  36.     print(" Blank Gamemode by your name here");
  37.     print("----------------------------------\n");
  38. }
  39.  
  40. public OnGameModeInit()
  41. {
  42.     // Enable all areas for all players.
  43.     Group_SetGlobalAreaDefault(true);
  44.     gBox = Area_AddBox(1918.8, 1314.1, 1957.0, 1283.5);
  45. }
  46.  
  47. public OnPlayerEnterArea(playerid, areaid)
  48. {
  49.     printf("ENTERED THE AREA");
  50. }
  51.  
  52. public OnPlayerLeaveArea(playerid, areaid)
  53. {
  54.     printf("EXITED THE AREA");
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement