Advertisement
cesar_google

[include]C_Posicion

Apr 23rd, 2012
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.86 KB | None | 0 0
  1. /****************************************************
  2.  
  3.       Include hecho por:  Cesar_Goole
  4.  
  5.              Version : 1.0
  6.  
  7.            Teletransportaciones
  8.  
  9.  
  10. include: El siguiente include tiene como funcion
  11.  
  12. teletransportar a uno o mas jugadores a una zona
  13.  
  14. especifica sin tener que colocarlos en la misma
  15.  
  16. posicion.
  17.  
  18. ******************************************************/
  19.  
  20. /*
  21.  
  22. Uso de las Funciones :
  23.  
  24.  
  25. SetPlayerPosCuadrilateral(playerid,Float:x,Float:y,Float:z);
  26.  
  27.  
  28. SetAllPlayersPosCuadrilateral(Float:x,Float:y,Float:z);
  29.  
  30.  
  31. SetPlayerPosLine(playerid,Float:x,Float:y,Float:z);
  32.  
  33.  
  34. SetAllPlayersPosLine(Float:x,Float:y,Float:z);
  35.  
  36.  
  37. */
  38. #include <a_samp>
  39.  
  40.  
  41. forward SetPlayerPosCuadrilateral(playerid,Float:x,Float:y,Float:z);
  42.  
  43. forward SetAllPlayersPosCuadrilateral(Float:x,Float:y,Float:z);
  44.  
  45. forward SetPlayerPosLine(playerid,Float:x,Float:y,Float:z);
  46.  
  47. forward SetAllPlayersPosLine(Float:x,Float:y,Float:z);
  48.  
  49.  
  50.  
  51. public SetPlayerPosCuadrilateral(playerid,Float:x,Float:y,Float:z)
  52. {
  53. new Randon = random(4);
  54. switch(Randon)
  55. {
  56. case 0:SetPlayerPos(playerid,Float:x+20,Float:y+20,Float:z);
  57. case 1:SetPlayerPos(playerid,Float:x-20,Float:y-20,Float:z);
  58. case 2:SetPlayerPos(playerid,Float:x+20,Float:y,Float:z);
  59. case 3:SetPlayerPos(playerid,Float:x,Float:y-20,Float:z);
  60. }
  61. return 1;
  62. }
  63.  
  64. public SetAllPlayersPosCuadrilateral(Float:x,Float:y,Float:z)
  65. {
  66. for(new i=0; i<MAX_PLAYERS; i++)
  67. {
  68. new Randon = random(4);
  69. switch(Randon)
  70. {
  71. case 0:SetPlayerPos(i,Float:x+30,Float:y+30,Float:z);
  72. case 1:SetPlayerPos(i,Float:x-30,Float:y-30,Float:z);
  73. case 2:SetPlayerPos(i,Float:x+30,Float:y,Float:z);
  74. case 3:SetPlayerPos(i,Float:x,Float:y-30,Float:z);
  75. }
  76. }
  77. return 1;
  78. }
  79.  
  80. public SetPlayerPosLine(playerid,Float:x,Float:y,Float:z)
  81. {
  82. new Randon = random(7);
  83. switch(Randon)
  84. {
  85. case 0:SetPlayerPos(playerid,Float:x,Float:y+5,Float:z);
  86. case 1:SetPlayerPos(playerid,Float:x,Float:y+10,Float:z);
  87. case 2:SetPlayerPos(playerid,Float:x,Float:y+15,Float:z);
  88. case 3:SetPlayerPos(playerid,Float:x,Float:y+20,Float:z);
  89. case 4:SetPlayerPos(playerid,Float:x,Float:y+25,Float:z);
  90. case 5:SetPlayerPos(playerid,Float:x,Float:y+30,Float:z);
  91. case 6:SetPlayerPos(playerid,Float:x,Float:y+35,Float:z);
  92. }
  93. return 1;
  94. }
  95.  
  96. public SetAllPlayersPosLine(Float:x,Float:y,Float:z)
  97. {
  98. for(new i=0; i<MAX_PLAYERS; i++)
  99. {
  100. new Randon = random(10);
  101. switch(Randon)
  102. {
  103. case 0:SetPlayerPos(i,Float:x,Float:y+5,Float:z);
  104. case 1:SetPlayerPos(i,Float:x,Float:y+10,Float:z);
  105. case 2:SetPlayerPos(i,Float:x,Float:y+15,Float:z);
  106. case 3:SetPlayerPos(i,Float:x,Float:y+20,Float:z);
  107. case 4:SetPlayerPos(i,Float:x,Float:y+25,Float:z);
  108. case 5:SetPlayerPos(i,Float:x,Float:y+30,Float:z);
  109. case 6:SetPlayerPos(i,Float:x,Float:y+35,Float:z);
  110. case 7:SetPlayerPos(i,Float:x,Float:y+40,Float:z);
  111. case 8:SetPlayerPos(i,Float:x,Float:y+45,Float:z);
  112. case 9:SetPlayerPos(i,Float:x,Float:y+50,Float:z);
  113. }
  114. }
  115. return 1;
  116. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement