Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2024
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. #include <a_samp>
  2. #include <core>
  3. #include <float>
  4. #include <image>
  5. #include <CA3>
  6.  
  7. #pragma tabsize 0
  8.  
  9. main()
  10. {
  11. print("\n----------------------------------");
  12. print(" Bare Script\n");
  13. print("----------------------------------\n");
  14. }
  15.  
  16. public OnPlayerConnect(playerid)
  17. {
  18. GameTextForPlayer(playerid,"~w~SA-MP: ~r~Bare Script",5000,5);
  19. return 1;
  20. }
  21.  
  22. public OnPlayerCommandText(playerid, cmdtext[])
  23. {
  24. new idx;
  25. new cmd[256];
  26.  
  27. cmd = strtok(cmdtext, idx);
  28.  
  29. if(strcmp(cmd, "/yadayada", true) == 0) {
  30. return 1;
  31. }
  32.  
  33. return 0;
  34. }
  35.  
  36. public OnPlayerSpawn(playerid)
  37. {
  38. SetPlayerInterior(playerid,0);
  39. TogglePlayerClock(playerid,0);
  40. return 1;
  41. }
  42.  
  43. public OnPlayerDeath(playerid, killerid, reason)
  44. {
  45. return 1;
  46. }
  47.  
  48. SetupPlayerForClassSelection(playerid)
  49. {
  50. SetPlayerInterior(playerid,14);
  51. SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
  52. SetPlayerFacingAngle(playerid, 270.0);
  53. SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
  54. SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
  55. }
  56.  
  57. public OnPlayerRequestClass(playerid, classid)
  58. {
  59. SetupPlayerForClassSelection(playerid);
  60. return 1;
  61. }
  62.  
  63. public OnGameModeInit()
  64. {
  65. SetGameModeText("Bare Script");
  66. ShowPlayerMarkers(1);
  67. ShowNameTags(1);
  68. AllowAdminTeleport(1);
  69.  
  70. AddPlayerClass(265,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,-1,-1);
  71.  
  72. CreateArt3(image, 5, 1958.3783,1333.1572,25.3746, 90, 0, 180);
  73. return 1;
  74. }
  75.  
  76. strtok(const string[], &index)
  77. {
  78. new length = strlen(string);
  79. while ((index < length) && (string[index] <= ' '))
  80. {
  81. index++;
  82. }
  83.  
  84. new offset = index;
  85. new result[20];
  86. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  87. {
  88. result[index - offset] = string[index];
  89. index++;
  90. }
  91. result[index - offset] = EOS;
  92. return result;
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement