SA-MP Forums Archive
Problem with dialog teleport with vehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with dialog teleport with vehicle (/showthread.php?tid=236798)



Problem with dialog teleport with vehicle - Gotti_ - 08.03.2011

I have something like this

Quote:

if(dialogid == 8900) //vamo stavite isti broj kao sto ste maloprije stavili
{
if(response)
{
if(listitem == 0) // Sta se desi ako igrac klikne na pendrek u izborniku (dialogu)
{
Pause(playerid);
SetPlayerPos(playerid, 3442.8096,2174.8762,3.0713);
GameTextForPlayer(playerid,"~y~Gymkhana Airport ~r~ by MosQ",3000,4);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);

}
if(listitem == 1) // Sta se desi ako igrac klikne na pendrek u izborniku (dialogu)
{
SetPlayerPos(playerid, 1320.0548,1261.0146,10.8203);
GameTextForPlayer(playerid,"~b~Las ~w~ Venturas ~r~ Airport",3000,4);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
}
}
return 1;
}

If i add car teleport like this in command :

Quote:

if (strcmp("//aa", cmdtext, true, 10) == 0)
{
if (IsPlayerInAnyVehicle(playerid)) {
SetVehiclePos(GetPlayerVehicleID(playerid), 325.3232,2544.5586,16.8077);
}
else
{

SetPlayerPos(playerid, 325.3232,2544.5586,16.8077);
GameTextForPlayer(playerid,"~r~Abandoned Airport ~b~By MosQ",3000,4);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
}
return 1;
}

It won't work, it will teleport me to another teleport...


Re: Problem with dialog teleport with vehicle - Bogdanovic - 08.03.2011

Check this:

(dialogid == 8900)

The ID of Dialog.


Re: Problem with dialog teleport with vehicle - Sascha - 08.03.2011

try it this way
pawn Код:
if (strcmp("/aa", cmdtext, true, 3) == 0)
{
  if (IsPlayerInAnyVehicle(playerid)) {
    SetVehiclePos(GetPlayerVehicleID(playerid), 325.3232,2544.5586,16.8077);
  }
  else
  {
    SetPlayerPos(playerid, 325.3232,2544.5586,16.8077);
    GameTextForPlayer(playerid,"~r~Abandoned Airport ~b~By MosQ",3000,4);
    SetPlayerArmour(playerid, 0);
    ResetPlayerWeapons(playerid);
  }
  return 1;
}



Re: Problem with dialog teleport with vehicle - Gotti_ - 08.03.2011

i just want to add car-teleport on dialog, i gave u simple teleport command with car and when i add it to dialog it wont work..


Re: Problem with dialog teleport with vehicle - Davz*|*Criss - 08.03.2011

Could you explain better please?


Re: Problem with dialog teleport with vehicle - Gotti_ - 08.03.2011

see, if i add something like this in dialog:

Quote:

if (strcmp("/aa", cmdtext, true, 3) == 0)
{
if (IsPlayerInAnyVehicle(playerid)) {
SetVehiclePos(GetPlayerVehicleID(playerid), 325.3232,2544.5586,16.8077);
}
else
{
SetPlayerPos(playerid, 325.3232,2544.5586,16.8077);
GameTextForPlayer(playerid,"~r~Abandoned Airport ~b~By MosQ",3000,4);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
}
return 1;
}

it wont work, it wont teleport player with a car, it will teleport him without and to other teleport, dialog is only working without a car like i posted first 2 dialogs.. and thats problem.. i want car-teleport on dialog


Re: Problem with dialog teleport with vehicle - Gotti_ - 08.03.2011

anyone ?


Re: Problem with dialog teleport with vehicle - Stigg - 08.03.2011

Quote:
Originally Posted by Gotti_
Посмотреть сообщение
I have something like this




If i add car teleport like this in command :



It won't work, it will teleport me to another teleport...
Check your cord's if your teleporting to the wrong location.


Re: Problem with dialog teleport with vehicle - Sascha - 08.03.2011

pawn Код:
if(dialogid == 8900) //vamo stavite isti broj kao sto ste maloprije stavili
{
if(response)
{
if(listitem == 0) // Sta se desi ako igrac klikne na pendrek u izborniku (dialogu)
{
Pause(playerid);
if(IsPlayerInAnyVehicle(playerid)) SetVehiclePos(GetPlayerVehicleID(playerid), 3442.8096,2174.8762,3.0713);
else SetPlayerPos(playerid, 3442.8096,2174.8762,3.0713);
GameTextForPlayer(playerid,"~y~Gymkhana Airport ~r~ by MosQ",3000,4);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);

}
if(listitem == 1) // Sta se desi ako igrac klikne na pendrek u izborniku (dialogu)
{
if(IsPlayerInAnyVehicle(playerid)) SetVehiclePos(GetPlayerVehicleID(playerid), 1320.0548,1261.0146,10.8203);
else SetPlayerPos(playerid, 1320.0548,1261.0146,10.8203);
GameTextForPlayer(playerid,"~b~Las ~w~ Venturas ~r~ Airport",3000,4);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
}
}
return 1;
}
is this what you want?


Re: Problem with dialog teleport with vehicle - Shetch - 08.03.2011

God dammit... The guy just wants to teleport with his car.

Example: I write /tele and if i'm in a car, then i teleport to the position with my car..

Teleport with car!