OtaconEvil

[FUNCION] TeleportJumperEasy By OTACON

Sep 8th, 2013
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 6.04 KB | None | 0 0
  1.     /*
  2.         * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  3.         *
  4.         * Estè Simple FUNCION esta hecho especialmente para www.forum.sa-mp.com
  5.         * NO Publicar estè FUNCION en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
  6.         *
  7.         * Codigo Creado Por OTACON
  8.         *
  9.         * CREDITOS:
  10.         *     OTACON: Realizacion y Idea de creacion del code.
  11.         *     TÙ: Modificacion libremente respetando lo mencionado ;).
  12.         *
  13.         *    NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  14.         *
  15.         *            Prohibido TOTALMENTE el Robo de Créditos o la
  16.         *              Publicación de este FUNCION sin Mi Permiso.
  17.     */
  18.  
  19.     /*
  20.         * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  21.         *
  22.         * This simple FUNCTION is made especially for www.forum.sa-mp.com
  23.         * DO NOT Post the FUNCTION in Other SAMP forums and impersonating the creator of the CODE.
  24.         *
  25.         * Code Created By OTACON
  26.         *
  27.         * CREDITS:
  28.         *     OTACON: Idea Making and code creation.
  29.         *     YOUR: Modification freely respecting the above ;).
  30.         *
  31.         *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  32.         *
  33.         *                    FULLY spaces Theft Credit or
  34.         *             Publication of this MAP without my permission.
  35.     */
  36.  
  37. [CENTER][B][COLOR="DarkOrange"][SIZE="6"][] TeleportJumperEasy[/SIZE][/COLOR][/B][/CENTER]
  38.  
  39. [COLOR="DarkOrchid"][B][SIZE="4"][] Informacio:[/SIZE][/B][/COLOR]
  40. [B][COLOR="DarkOrange"]es una simple funcion con la que puedes teletransportarte de  un punto a otro mediante vehiculo o caminando.[/COLOR][/B]
  41.  
  42. [COLOR="DarkOrchid"][B][SIZE="4"][] Native:[/SIZE][/B][/COLOR]
  43. [pawn]
  44.     native TeleportJumperEasy(playerid, Float:distancia, Float:enterx,Float:entery,Float:enterz,intenter,vwenter, Float:exitx,Float:exity,Float:exitz,intexit,vwexit, estado=PLAYER_STATE_ONFOOT);
  45. [/pawn]
  46.  
  47. [COLOR="DarkOrchid"][B][SIZE="4"][] Funcion:[/SIZE][/B][/COLOR]
  48. [pawn]
  49. stock TeleportJumperEasy(playerid, Float:distancia, Float:enterx,Float:entery,Float:enterz,intenter,vwenter, Float:exitx,Float:exity,Float:exitz,intexit,vwexit, estado=PLAYER_STATE_ONFOOT) {
  50.     if(IsPlayerInRangeOfPoint(playerid, distancia, enterx,entery,enterz)) { //By OTACON
  51.         switch(estado) {
  52.             case PLAYER_STATE_ONFOOT: {
  53.             SetPlayerPos(playerid,exitx,exity,exitz);
  54.             SetPlayerInterior(playerid, intexit);
  55.             SetPlayerVirtualWorld(playerid, vwexit);
  56.             } case PLAYER_STATE_DRIVER: {
  57.             SetVehiclePos(GetPlayerVehicleID(playerid), exitx,exity,exitz);
  58.             LinkVehicleToInterior(GetPlayerVehicleID(playerid), intexit);
  59.             SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), vwexit);
  60.             for(new player, j = GetMaxPlayers(); player != j; player++) {
  61.                 if(!IsPlayerConnected(player)) continue;
  62.                 if(IsPlayerInVehicle(player, GetPlayerVehicleID(playerid)) && GetPlayerState(player)==PLAYER_STATE_PASSENGER) {
  63.                     SetPlayerInterior(player, intexit);
  64.                     SetPlayerVirtualWorld(player, vwexit);
  65.                     break;
  66.                 }
  67.             } }
  68.         }
  69.     } else if(IsPlayerInRangeOfPoint(playerid, distancia, exitx,exity,exitz)) {
  70.         switch(estado) {
  71.             case PLAYER_STATE_ONFOOT: {
  72.             SetPlayerPos(playerid,enterx,entery,enterz);
  73.             SetPlayerInterior(playerid, intenter);
  74.             SetPlayerVirtualWorld(playerid, vwenter);
  75.             } case PLAYER_STATE_DRIVER: {
  76.             SetVehiclePos(GetPlayerVehicleID(playerid), enterx,entery,enterz);
  77.             LinkVehicleToInterior(GetPlayerVehicleID(playerid), intenter);
  78.             SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), vwenter);
  79.             for(new player, j = GetMaxPlayers(); player != j; player++) {
  80.                 if(!IsPlayerConnected(player)) continue;
  81.                 if(IsPlayerInVehicle(player, GetPlayerVehicleID(playerid)) && GetPlayerState(player)==PLAYER_STATE_PASSENGER) {
  82.                     SetPlayerInterior(player, intenter);
  83.                     SetPlayerVirtualWorld(player, vwenter);
  84.                     break;
  85.                 }
  86.             } }
  87.         }
  88.     } return true;
  89. }
  90. [/pawn]
  91.  
  92. [COLOR="DarkOrchid"][B][SIZE="4"][] Ejemplo de Uso:[/SIZE][/B][/COLOR]
  93. [pawn]
  94. #include <a_samp>
  95. #include <zcmd>
  96.  
  97. COMMAND:vehiculo(playerid, params[]) {
  98.     //Te teletransportara de la entrada de la comisaria LS al interior de la misma, solo desde vehiculo (debes estar en los puntos especificos).
  99.     TeleportJumperEasy(playerid, 2.0, 1553.8964,-1675.6272,16.1953,0,0, 246.7840,63.9002,1003.6406,0,0, PLAYER_STATE_DRIVER);
  100.     return true;
  101. }
  102. COMMAND:caminando(playerid, params[]) {
  103.     //Te teletransportara de la entrada de la comisaria LS al interior de la misma, solo caminando(debes estar en los puntos especificos).
  104.     TeleportJumperEasy(playerid, 2.0, 1553.8964,-1675.6272,16.1953,0,0, 246.7840,63.9002,1003.6406,0,0, PLAYER_STATE_ONFOOT);
  105.     return true;
  106. }
  107. [/pawn]
  108.  
  109. [COLOR="DarkOrchid"][B][SIZE="4"][] Creditos:[/SIZE][/B][/COLOR]
  110. [COLOR="DarkOrange"][B][SIZE="3"]OTACON[/SIZE][/B][/COLOR]
  111.  
  112.     /*
  113.         * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  114.         *
  115.         * Estè Simple FUNCION esta hecho especialmente para www.forum.sa-mp.com
  116.         * NO Publicar estè FUNCION en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
  117.         *
  118.         * Codigo Creado Por OTACON
  119.         *
  120.         * CREDITOS:
  121.         *     OTACON: Realizacion y Idea de creacion del code.
  122.         *     TÙ: Modificacion libremente respetando lo mencionado ;).
  123.         *
  124.         *    NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  125.         *
  126.         *            Prohibido TOTALMENTE el Robo de Créditos o la
  127.         *              Publicación de este FUNCION sin Mi Permiso.
  128.     */
  129.  
  130.     /*
  131.         * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  132.         *
  133.         * This simple FUNCTION is made especially for www.forum.sa-mp.com
  134.         * DO NOT Post the FUNCTION in Other SAMP forums and impersonating the creator of the CODE.
  135.         *
  136.         * Code Created By OTACON
  137.         *
  138.         * CREDITS:
  139.         *     OTACON: Idea Making and code creation.
  140.         *     YOUR: Modification freely respecting the above ;).
  141.         *
  142.         *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  143.         *
  144.         *                    FULLY spaces Theft Credit or
  145.         *             Publication of this MAP without my permission.
  146.     */
Advertisement
Add Comment
Please, Sign In to add comment