Dialog Teles
#1

Код:
if(!strcmp(cmdtext, "/teles", true))
	{
	ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "Teles:","Wheel Arch Angels\nTransfender\nLV Drift Place\nLas Venturas","Tele","Cancel");
	return 1;
	}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem)
	{
	if(dialogid == TELES)
	{
	if(response)
	{
	if(listitem == 0) // WHEEL ARCH ANGELS
	{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
	SetVehiclePos(GetPlayerVehicleID(playerid),-2701.4585,217.5867,3.8385);
	SetVehicleZAngle(GetPlayerVehicleID(playerid), 91.2956);
	LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
	} else {
	RemovePlayerFromVehicle(playerid);
	SetPlayerPos(playerid,-2701.4585,217.5867,3.8385);
	SetPlayerFacingAngle(playerid, 91.2956);
	SetCameraBehindPlayer(playerid);
	}
	}
	if(listitem == 1)  // TRANSFENDER
	{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
	SetVehiclePos(GetPlayerVehicleID(playerid),-1935.6522,228.0252,33.8146);
	SetVehicleZAngle(GetPlayerVehicleID(playerid), 1.5406);
	LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
	} else {
	RemovePlayerFromVehicle(playerid);
	SetPlayerPos(playerid,-1935.6522,228.0252,33.8146);
	SetPlayerFacingAngle(playerid, 1.5406);
	SetCameraBehindPlayer(playerid);
	}
	if(listitem == 2) // LS DRIFT PLACE
	{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
	SetVehiclePos(GetPlayerVehicleID(playerid),-353.9413,1530.6729,75.0178);
	SetVehicleZAngle(GetPlayerVehicleID(playerid), 261.2167);
	LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
	} else {
	RemovePlayerFromVehicle(playerid);
	SetPlayerPos(playerid,-322.3323,1534.3572,75.3594);
	SetPlayerFacingAngle(playerid, 212.9927);
	SetCameraBehindPlayer(playerid);
	}
	if(listitem == 3) // LAS VENTURAS
	{
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
	SetVehiclePos(GetPlayerVehicleID(playerid),2173.6948,1680.2266,10.5474);
	SetVehicleZAngle(GetPlayerVehicleID(playerid), 85.7950);
	LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
	} else {
	RemovePlayerFromVehicle(playerid);
	SetPlayerPos(playerid,2187.9893,1668.9257,11.1105);
	SetPlayerFacingAngle(playerid, 55.3078);
	SetCameraBehindPlayer(playerid);
	}
	return 1;
	}
	}
	}
	}
	}
	return 1;
	}
So , problem is that that LV Drift Place and Las Venturas doesn't work. It just don't teleport. Whats the problem ? Please help!
Reply
#2

*BUMP*
I realy need it !
Reply
#3

Noone can help me ? :O
Reply
#4

Your
Код:
SetPlayerPos(playerid, 2187.9893,1668.9257,11.1105);
Код:
SetPlayerPos(playerid,-322.3323,1534.3572,75.3594);
The POS might be wrong or bugged, so get new ones.
And just simply replace the old ones.
Reply
#5

No , POS's are right .
It just doesn't teleport.
Reply
#6

Learn how to debug.
Add prints and see if the function is actually being called.
Reply
#7

-.-
Help me just how to fix it.
Reply
#8

pawn Код:
if(!strcmp(cmdtext, "/teles", true))
{
    ShowPlayerDialog(playerid, TELES, DIALOG_STYLE_LIST, "Teles:","Wheel Arch Angels\nTransfender\nLV Drift Place\nLas Venturas","Tele","Cancel");
    return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem)
{
    if(dialogid == TELES)
    {
        if(response)
        {
            if(listitem == 0) // WHEEL ARCH ANGELS
            {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    SetVehiclePos(GetPlayerVehicleID(playerid),-2701.4585,217.5867,3.8385);
                    SetVehicleZAngle(GetPlayerVehicleID(playerid), 91.2956);
                    LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
                } else {
                    RemovePlayerFromVehicle(playerid);
                    SetPlayerPos(playerid,-2701.4585,217.5867,3.8385);
                    SetPlayerFacingAngle(playerid, 91.2956);
                    SetCameraBehindPlayer(playerid);
                }
                return 1;
            }
            if(listitem == 1)  // TRANSFENDER
            {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    SetVehiclePos(GetPlayerVehicleID(playerid),-1935.6522,228.0252,33.8146);
                    SetVehicleZAngle(GetPlayerVehicleID(playerid), 1.5406);
                    LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
                } else {
                    RemovePlayerFromVehicle(playerid);
                    SetPlayerPos(playerid,-1935.6522,228.0252,33.8146);
                    SetPlayerFacingAngle(playerid, 1.5406);
                    SetCameraBehindPlayer(playerid);
                }
                return 1;
            }
            if(listitem == 2) // LS DRIFT PLACE
            {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    SetVehiclePos(GetPlayerVehicleID(playerid),-353.9413,1530.6729,75.0178);
                    SetVehicleZAngle(GetPlayerVehicleID(playerid), 261.2167);
                    LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
                } else {
                    RemovePlayerFromVehicle(playerid);
                    SetPlayerPos(playerid,-322.3323,1534.3572,75.3594);
                    SetPlayerFacingAngle(playerid, 212.9927);
                    SetCameraBehindPlayer(playerid);
                }
                return 1;
            }
            if(listitem == 3) // LAS VENTURAS
            {
                if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
                {
                    SetVehiclePos(GetPlayerVehicleID(playerid),2173.6948,1680.2266,10.5474);
                    SetVehicleZAngle(GetPlayerVehicleID(playerid), 85.7950);
                    LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
                } else {
                    RemovePlayerFromVehicle(playerid);
                    SetPlayerPos(playerid,2187.9893,1668.9257,11.1105);
                    SetPlayerFacingAngle(playerid, 55.3078);
                    SetCameraBehindPlayer(playerid);
                }
                return 1;
            }
        }
    }
    return 0;
}
Reply
#9

THANK U VERY MUCH .
Got it working.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)