Takes me to the next teleport...
#1

Quote:

if(dialogid == Dialog_Stunts)
{
if(response)
{
if(listitem==0)
{
new vehicleid=GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if (IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
LinkVehicleToInterior(vehicleid, 0);
SetPlayerInterior(playerid, 0);
SetVehicleZAngle(vehicleid,0);
return SetVehiclePos(vehicleid,5070.8862304688,-2250.9711914063,403.73211669922);
}else{
SetPlayerPos(playerid,5070.8862304688,-2250.9711914063,403.73211669922);
}
if(listitem==1)
{
new vehicleid=GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if (IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
LinkVehicleToInterior(vehicleid, 0);
SetPlayerInterior(playerid, 0);
SetVehicleZAngle(vehicleid,0);
return SetVehiclePos(vehicleid,2971.0080566406,-1677.5942382813,24.16156578064);
}else{
SetPlayerPos(playerid,2971.0080566406,-1677.5942382813,24.16156578064);
}
if(listitem==2)
{
SendClientMessage(playerid,COLOR_BLUE,"We are working on this teleport.");
}
if(listitem==3)
{
new vehicleid=GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if (IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
LinkVehicleToInterior(vehicleid, 0);
SetPlayerInterior(playerid, 0);
SetVehicleZAngle(vehicleid,0);
return SetVehiclePos(vehicleid,-2676.1360,1587.4894,217.507;
}else{
SetPlayerPos(playerid,-2676.1360,1587.4894,217.507;
}
if(listitem==4)
{
new vehicleid=GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if (IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
LinkVehicleToInterior(vehicleid, 0);
SetPlayerInterior(playerid, 0);
SetVehicleZAngle(vehicleid,0);
return SetVehiclePos(vehicleid,2003.3203, -2728.3459, 12.4432);
}else{
SetPlayerPos(playerid,2003.3203, -2728.3459, 12.4432);
}
if(listitem==5)
{
new vehicleid=GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if (IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
LinkVehicleToInterior(vehicleid, 0);
SetPlayerInterior(playerid, 0);
SetVehicleZAngle(vehicleid,0);
return SetVehiclePos(vehicleid,357.75280762,2074.29980469 ,17.24940109);
}else{
SetPlayerPos(playerid,357.75280762,2074.29980469,1 7.24940109);
}
if(listitem==6)
{
new vehicleid=GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if (IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
LinkVehicleToInterior(vehicleid, 0);
SetPlayerInterior(playerid, 0);
SetVehicleZAngle(vehicleid,0);
return SetVehiclePos(vehicleid,3362.1589355469,-2069.42578125,46.729736328125);
}else{
SetPlayerPos(playerid,3362.1589355469,-2069.42578125,46.729736328125);
}

Am I doing something wrong here because it takes me to the wrong teles when it was alone with only SetPlayerPos it worked fine but since I added the vehicle bit it messes up...
Reply
#2

nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
Reply
#3

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Reply
#4

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == Dialog_Stunts)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    new vehicleid = GetPlayerVehicleID(playerid);
                    LinkVehicleToInterior(vehicleid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetVehicleZAngle(vehicleid,0);
                    SetVehiclePos(vehicleid,5070.8862304688,-2250.9711914063,403.73211669922);
                }
                else
                {
                    SetPlayerPos(playerid,5070.8862304688,-2250.9711914063,403.73211669922);
                }
            }
            if(listitem == 1)
            {
                if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    new vehicleid = GetPlayerVehicleID(playerid);
                    LinkVehicleToInterior(vehicleid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetVehicleZAngle(vehicleid,0);
                    SetVehiclePos(vehicleid,2971.0080566406,-1677.5942382813,24.16156578064);
                }
                else
                {
                    SetPlayerPos(playerid,2971.0080566406,-1677.5942382813,24.16156578064);
                }
            }
            if(listitem == 2)
            {
                SendClientMessage(playerid,COLOR_BLUE,"We are working on this teleport.");
            }
            if(listitem == 3)
            {
                if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    new vehicleid = GetPlayerVehicleID(playerid);
                    LinkVehicleToInterior(vehicleid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetVehicleZAngle(vehicleid,0);
                    SetVehiclePos(vehicleid,-2676.1360,1587.4894,217.507);
                }
                else
                {
                    SetPlayerPos(playerid,-2676.1360,1587.4894,217.507);
                }
            }
            if(listitem == 4)
            {
                if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    new vehicleid = GetPlayerVehicleID(playerid);
                    LinkVehicleToInterior(vehicleid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetVehicleZAngle(vehicleid,0);
                    SetVehiclePos(vehicleid,2003.3203, -2728.3459, 12.4432);
                }
                else
                {
                    SetPlayerPos(playerid,2003.3203, -2728.3459, 12.4432);
                }
            }
            if(listitem == 5)
            {
                if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    new vehicleid = GetPlayerVehicleID(playerid);
                    LinkVehicleToInterior(vehicleid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetVehicleZAngle(vehicleid,0);
                    SetVehiclePos(vehicleid,357.75280762,2074.29980469 ,17.24940109);
                }
                else
                {
                    SetPlayerPos(playerid,357.75280762,2074.29980469,1 7.24940109);
                }
            }
            if(listitem == 6)
            {
                if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    new vehicleid = GetPlayerVehicleID(playerid);
                    LinkVehicleToInterior(vehicleid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetVehicleZAngle(vehicleid,0);
                    SetVehiclePos(vehicleid,3362.1589355469,-2069.42578125,46.729736328125);
                }
                else
                {
                    SetPlayerPos(playerid,3362.1589355469,-2069.42578125,46.729736328125);
                }
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)