new pickup;
new pickup2;
Public OnGame....
pickup=CreatePickup(1273, 1, -238.5736,8040.8096,24.1094);
pickup2=CreatePickup(1273, 1, -217.7320,8080.3599,2556.7458);
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup)
{
SetPlayerPos(playerid,-218.2087,8082.5713,2556.7458); // Coordenada del teleport
}
if(pickupid == pickup2)
{
SetPlayerPos(playerid,-238.6863,8043.1011,22.7203); // Coordenada del teleport
}
return 1;
}
stock TeleportPlayer(playerid, Float:x,Float:y,Float:z)
{
new cartype = GetPlayerVehicleID(playerid);
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SetPlayerPos(playerid,x,y,z);
}
else if(IsPlayerInVehicle(playerid, cartype) == 1)
{
SetVehiclePos(cartype,x,y,z);
}
else
{
SetPlayerPos(playerid,x,y,z);
}
}//extraido del game mode de "divercion en espaсol gtachile"
TeleportPlayer(playerid,x,y,z);// coordenadas
if(pickupid == pickupzlSNkUarDol) { TeleportPlayer(playerid,-218.2087,8082.5713,2556.745; return 1; } if(pickupid == pickupzlSNkUarDolsalida) { TeleportPlayer(playerid,-238.6863,8043.1011,22.720); // Interior del teleport return 1; } return 0; |