Advertisement
Guest User

Untitled

a guest
Feb 10th, 2017
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.14 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new spawnLV = 0;
  4. new spawnLS = 0;
  5. new spawnSF = 0;
  6. new randomspawn = 1;
  7.  
  8. new Float:LVSpawn[][4] =
  9. {
  10. {1933.1464,1343.5929,9.9688,269.2728}, // LVS1
  11. {1958.5511,1342.9436,15.3746,269.2821}, // LVS2
  12. {2033.4695,1544.2429,10.8203,268.1299}, // LVS3
  13. {2223.4128,1837.3754,10.8203,89.4003}, // LVS4
  14. {2192.8105,1987.5022,12.2969,88.9012} // LVS5
  15. //Add your random spawns here with cords for LV
  16. };
  17.  
  18. new Float:SFSpawn[][4] =
  19. {
  20. {-1811.6882,-149.2168,9.3984,357.6486}, // SFS1
  21. {-1521.9855,807.8555,7.1875,89.6792}, // SFS2
  22. {-1596.5006,863.4152,7.6875,177.6337}, // SFS3
  23. {-1572.8306,819.5630,7.1875,177.6337}, // SFS4
  24. {-1605.2600,714.1086,13.0824,357.6337} // SFS5
  25. //Add your random spawns here with cords for SF
  26. };
  27.  
  28. new Float:LSSpawn[][4] =
  29. {
  30. {1119.6107,-930.1211,43.0991,268.2935}, // LSS1
  31. {1174.9585,-885.5205,43.2609,282.3936}, // LSS2
  32. {1129.0831,-1466.4542,15.7498,3.0928}, // LSS3
  33. {1552.1587,-1675.7168,16.1683,89.2326}, // LSS4
  34. {354.3548,-1814.6611,4.3767,359.7548} // LSS5
  35. //Add your random spawns here with cords for LS
  36. };
  37.  
  38. new Float:RandomSpawn[][4] =
  39. {
  40. {1119.6107,-930.1211,43.0991,268.2935}, // LSS1
  41. {1174.9585,-885.5205,43.2609,282.3936}, // LSS2
  42. {-1572.8306,819.5630,7.1875,177.6337}, // SFS4
  43. {-1605.2600,714.1086,13.0824,357.6337}, // SFS5
  44. {1129.0831,-1466.4542,15.7498,3.0928}, // LSS3
  45. {1933.1464,1343.5929,9.9688,269.2728}, // LVS1
  46. {1958.5511,1342.9436,15.3746,269.2821}, // LVS2
  47. {2033.4695,1544.2429,10.8203,268.1299}, // LVS3
  48. {1552.1587,-1675.7168,16.1683,89.2326}, // LSS4
  49. {-1811.6882,-149.2168,9.3984,357.6486}, // SFS1
  50. {-1521.9855,807.8555,7.1875,89.6792}, // SFS2
  51. {-1596.5006,863.4152,7.6875,177.6337}, // SFS3
  52. {354.3548,-1814.6611,4.3767,359.7548}, // LSS5
  53. {2223.4128,1837.3754,10.8203,89.4003}, // LVS4
  54. {2192.8105,1987.5022,12.2969,88.9012} // LVS5
  55. //Add your random spawns here with cords for random spawns
  56. };
  57.  
  58. public OnPlayerSpawn(playerid)
  59. {
  60. new LVrand = random(sizeof(LVSpawn));
  61. new SFrand = random(sizeof(SFSpawn));
  62. new LSrand = random(sizeof(LSSpawn));
  63. new randrand = random(sizeof(RandomSpawn));
  64. if(spawnLV == 1)
  65. {
  66. SetPlayerPos(playerid, LVSpawn[LVrand][0], LVSpawn[LVrand][1],LVSpawn[LVrand][2]);
  67. }
  68. if(spawnSF == 1)
  69. {
  70. SetPlayerPos(playerid, SFSpawn[SFrand][0], SFSpawn[SFrand][1],SFSpawn[SFrand][2]);
  71. }
  72. if(spawnLS == 1)
  73. {
  74. SetPlayerPos(playerid, LSSpawn[LSrand][0], LSSpawn[LSrand][1],LSSpawn[LSrand][2]);
  75. }
  76. if(randomspawn == 1)
  77. {
  78. SetPlayerPos(playerid, RandomSpawn[randrand][0], RandomSpawn[randrand][1],RandomSpawn[randrand][2]);
  79. }
  80. return 1;
  81. }
  82.  
  83. public OnPlayerCommandText(playerid, cmdtext[])
  84. {
  85. if (strcmp("/sfspawn", cmdtext, true, 10) == 0)
  86. {
  87. spawnSF = 1;
  88. spawnLV = 0;
  89. spawnLS = 0;
  90. randomspawn = 0;
  91. SendClientMessage(playerid, 0x99FFFF, "You have set your spawnpoint to SF!");
  92. new str[64];
  93. format(str,sizeof(str),"~b~Spawnpoint:~n~~r~LV~b~/~r~LS~b~/~g~SF");
  94. GameTextForPlayer(playerid, str, 5000, 6);
  95. return 1;
  96. }
  97. if (strcmp("/lvspawn", cmdtext, true, 10) == 0)
  98. {
  99. spawnSF = 0;
  100. spawnLV = 1;
  101. spawnLS = 0;
  102. randomspawn = 0;
  103. SendClientMessage(playerid, 0x99FFFF, "You have set your spawnpoint to LV!");
  104. new str[64];
  105. format(str,sizeof(str),"~b~Spawnpoint:~n~~g~LV~b~/~r~LS~b~/~r~SF");
  106. GameTextForPlayer(playerid, str, 5000, 6);
  107. return 1;
  108. }
  109. if (strcmp("/lsspawn", cmdtext, true, 10) == 0)
  110. {
  111. spawnSF = 0;
  112. spawnLV = 0;
  113. spawnLS = 1;
  114. randomspawn = 0;
  115. SendClientMessage(playerid, 0x99FFFF, "You have set your spawnpoint to LS!");
  116. new str[64];
  117. format(str,sizeof(str),"~b~Spawnpoint:~n~~r~LV~b~/~g~LS~b~/~r~SF");
  118. GameTextForPlayer(playerid, str, 5000, 6);
  119. return 1;
  120. }
  121. if (strcmp("/randomspawn", cmdtext, true, 10) == 0)
  122. {
  123. spawnSF = 0;
  124. spawnLV = 0;
  125. spawnLS = 0;
  126. randomspawn = 1;
  127. SendClientMessage(playerid, 0x99FFFF, "You will now spawn in random cities!");
  128. new str[64];
  129. format(str,sizeof(str),"~b~Spawnpoint:~n~~g~Random");
  130. GameTextForPlayer(playerid, str, 5000, 6);
  131. return 1;
  132. }
  133. return 0;
  134. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement