20.05.2015, 14:35
Hi i know its easy but im bored so i created teleport with dialogs!
There 3 teleports you can add more if you want
Pic:
Code:
enjoey.
There 3 teleports you can add more if you want
Pic:
Code:
pawn Код:
//Teleports by UltraScripter!.
//Teleports by UltraScripter!.
#include <a_samp>
#define Teleport 119
#if defined FILTERSCRIPT
#endif
public OnFilterScriptInit()
{
print("\n-------------------------------------");
print("Teleports by UltraScripter loaded!...");
print("--------------------------------------\n");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/tele", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, Teleport, DIALOG_STYLE_LIST, "Teleports", "1. Ls\n2. Sf\n3. Lv\n4. Lb\n5. you can add more...", "Teleport", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new State = GetPlayerState(playerid), vehicleid = GetPlayerVehicleID(playerid);
if(dialogid == Teleport && response)
{
if(listitem == 0)
{
if(State == PLAYER_STATE_DRIVER)
{
SetVehiclePos(vehicleid, 2039.6772,1351.5836,10.6719);
SetVehicleZAngle(vehicleid, 270.3724);
PutPlayerInVehicle(playerid, (vehicleid), 0);
}
else
{
SetPlayerPos(playerid, 2039.6772,1351.5836,10.6719);
SetPlayerFacingAngle(playerid, 270.3724);
}
}
if(listitem == 1)
{
if(State == PLAYER_STATE_DRIVER)
{
SetVehiclePos(vehicleid, -2020.6836,156.4249,28.5737);
SetVehicleZAngle(vehicleid, 271.9157);
PutPlayerInVehicle(playerid, (vehicleid), 0);
}
else
{
SetPlayerPos(playerid, -2020.6836,156.4249,28.5737);
SetPlayerFacingAngle(playerid, 271.9157);
}
}
if(listitem == 2)
{
if(State == PLAYER_STATE_DRIVER)
{
SetVehiclePos(vehicleid, 2499.6157,-1670.1327,13.3478);
SetVehicleZAngle(vehicleid, 72.0074);
PutPlayerInVehicle(playerid, (vehicleid), 0);
}
else
{
SetPlayerPos(playerid, 2499.6157,-1670.1327,13.3478);
SetPlayerFacingAngle(playerid, 72.0074);
}
}
if(listitem == 3)
{
if(State == PLAYER_STATE_DRIVER)
{
LinkVehicleToInterior(vehicleid, 1);
SetVehiclePos(vehicleid, -742.0907,495.2944,1371.9766);
SetVehicleZAngle(vehicleid, 256.6662);
PutPlayerInVehicle(playerid, (vehicleid), 0);
}
else
{
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid, -742.0907,495.2944,1371.9766);
SetPlayerFacingAngle(playerid, 256.6662);
}
}
}
return 1;
}
//Teleports by UltraScripter!.
//Teleports by UltraScripter!.