Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
- *
- * Estè Simple FUNCION esta hecho especialmente para www.forum.sa-mp.com
- * NO Publicar estè FUNCION en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
- *
- * Codigo Creado Por OTACON
- *
- * CREDITOS:
- * OTACON: Realizacion y Idea de creacion del code.
- * TÙ: Modificacion libremente respetando lo mencionado ;).
- *
- * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
- *
- * Prohibido TOTALMENTE el Robo de Créditos o la
- * Publicación de este FUNCION sin Mi Permiso.
- */
- /*
- * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
- *
- * This simple FUNCTION is made especially for www.forum.sa-mp.com
- * DO NOT Post the FUNCTION in Other SAMP forums and impersonating the creator of the CODE.
- *
- * Code Created By OTACON
- *
- * CREDITS:
- * OTACON: Idea Making and code creation.
- * YOUR: Modification freely respecting the above ;).
- *
- * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
- *
- * FULLY spaces Theft Credit or
- * Publication of this MAP without my permission.
- */
- [CENTER][B][COLOR="DarkOrange"][SIZE="6"][] TeleportJumperEasy[/SIZE][/COLOR][/B][/CENTER]
- [COLOR="DarkOrchid"][B][SIZE="4"][] Informacio:[/SIZE][/B][/COLOR]
- [B][COLOR="DarkOrange"]es una simple funcion con la que puedes teletransportarte de un punto a otro mediante vehiculo o caminando.[/COLOR][/B]
- [COLOR="DarkOrchid"][B][SIZE="4"][] Native:[/SIZE][/B][/COLOR]
- [pawn]
- 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);
- [/pawn]
- [COLOR="DarkOrchid"][B][SIZE="4"][] Funcion:[/SIZE][/B][/COLOR]
- [pawn]
- 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) {
- if(IsPlayerInRangeOfPoint(playerid, distancia, enterx,entery,enterz)) { //By OTACON
- switch(estado) {
- case PLAYER_STATE_ONFOOT: {
- SetPlayerPos(playerid,exitx,exity,exitz);
- SetPlayerInterior(playerid, intexit);
- SetPlayerVirtualWorld(playerid, vwexit);
- } case PLAYER_STATE_DRIVER: {
- SetVehiclePos(GetPlayerVehicleID(playerid), exitx,exity,exitz);
- LinkVehicleToInterior(GetPlayerVehicleID(playerid), intexit);
- SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), vwexit);
- for(new player, j = GetMaxPlayers(); player != j; player++) {
- if(!IsPlayerConnected(player)) continue;
- if(IsPlayerInVehicle(player, GetPlayerVehicleID(playerid)) && GetPlayerState(player)==PLAYER_STATE_PASSENGER) {
- SetPlayerInterior(player, intexit);
- SetPlayerVirtualWorld(player, vwexit);
- break;
- }
- } }
- }
- } else if(IsPlayerInRangeOfPoint(playerid, distancia, exitx,exity,exitz)) {
- switch(estado) {
- case PLAYER_STATE_ONFOOT: {
- SetPlayerPos(playerid,enterx,entery,enterz);
- SetPlayerInterior(playerid, intenter);
- SetPlayerVirtualWorld(playerid, vwenter);
- } case PLAYER_STATE_DRIVER: {
- SetVehiclePos(GetPlayerVehicleID(playerid), enterx,entery,enterz);
- LinkVehicleToInterior(GetPlayerVehicleID(playerid), intenter);
- SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), vwenter);
- for(new player, j = GetMaxPlayers(); player != j; player++) {
- if(!IsPlayerConnected(player)) continue;
- if(IsPlayerInVehicle(player, GetPlayerVehicleID(playerid)) && GetPlayerState(player)==PLAYER_STATE_PASSENGER) {
- SetPlayerInterior(player, intenter);
- SetPlayerVirtualWorld(player, vwenter);
- break;
- }
- } }
- }
- } return true;
- }
- [/pawn]
- [COLOR="DarkOrchid"][B][SIZE="4"][] Ejemplo de Uso:[/SIZE][/B][/COLOR]
- [pawn]
- #include <a_samp>
- #include <zcmd>
- COMMAND:vehiculo(playerid, params[]) {
- //Te teletransportara de la entrada de la comisaria LS al interior de la misma, solo desde vehiculo (debes estar en los puntos especificos).
- TeleportJumperEasy(playerid, 2.0, 1553.8964,-1675.6272,16.1953,0,0, 246.7840,63.9002,1003.6406,0,0, PLAYER_STATE_DRIVER);
- return true;
- }
- COMMAND:caminando(playerid, params[]) {
- //Te teletransportara de la entrada de la comisaria LS al interior de la misma, solo caminando(debes estar en los puntos especificos).
- TeleportJumperEasy(playerid, 2.0, 1553.8964,-1675.6272,16.1953,0,0, 246.7840,63.9002,1003.6406,0,0, PLAYER_STATE_ONFOOT);
- return true;
- }
- [/pawn]
- [COLOR="DarkOrchid"][B][SIZE="4"][] Creditos:[/SIZE][/B][/COLOR]
- [COLOR="DarkOrange"][B][SIZE="3"]OTACON[/SIZE][/B][/COLOR]
- /*
- * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
- *
- * Estè Simple FUNCION esta hecho especialmente para www.forum.sa-mp.com
- * NO Publicar estè FUNCION en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
- *
- * Codigo Creado Por OTACON
- *
- * CREDITOS:
- * OTACON: Realizacion y Idea de creacion del code.
- * TÙ: Modificacion libremente respetando lo mencionado ;).
- *
- * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
- *
- * Prohibido TOTALMENTE el Robo de Créditos o la
- * Publicación de este FUNCION sin Mi Permiso.
- */
- /*
- * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
- *
- * This simple FUNCTION is made especially for www.forum.sa-mp.com
- * DO NOT Post the FUNCTION in Other SAMP forums and impersonating the creator of the CODE.
- *
- * Code Created By OTACON
- *
- * CREDITS:
- * OTACON: Idea Making and code creation.
- * YOUR: Modification freely respecting the above ;).
- *
- * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
- *
- * FULLY spaces Theft Credit or
- * Publication of this MAP without my permission.
- */
Advertisement
Add Comment
Please, Sign In to add comment