SA-MP Forums Archive
[help]is the a ingame teleport maker... - 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)
+--- Thread: [help]is the a ingame teleport maker... (/showthread.php?tid=354500)



[help]is the a ingame teleport maker... - [A]ndrei - 27.06.2012

hey guys i need a ingame teleport maker becuase i make maps in the water and i dont know how to get there in debug soooooo ya...i need a system or something...


Re: [help]is the a ingame teleport maker... - Jonny5 - 27.06.2012

you mean one you can just add to an array perhaps the cords?

i got one let me dig it up ill edit.


EDIT:

pawn Код:
//in OnDialogResponse
        case DIALOG_TELEPORTS :
        {
            if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!");
            if(GetPlayerVehicleID(playerid))
            {
                SetVehiclePos(GetPlayerVehicleID(playerid),aPlayerTeleports[listitem][ePT_X],aPlayerTeleports[listitem][ePT_Y],aPlayerTeleports[listitem][ePT_Z]);
            } else {
                SetPlayerPos(playerid,aPlayerTeleports[listitem][ePT_X],aPlayerTeleports[listitem][ePT_Y],aPlayerTeleports[listitem][ePT_Z]);
            }
            return 1;
        }



//the code for the teleports
#define DIALOG_TELEPORTS                5545
enum ePlayerTeleports
{
    ePT_Name[14],
    Float:ePT_X,
    Float:ePT_Y,
    Float:ePT_Z

}

new aPlayerTeleports[][ePlayerTeleports]=
{
    {"the strip"    , 2133.2334     , 1140.0221     , 13.1362},
    //{"skydive"        , 102.1095      , 2586.7051     , 214.77629},
    {"lsair"        , 1939.0291     , -2235.8638    , 13.5469},
    {"quarry"       , 809.9111      , 843.4572      , 9.8722},
    {"aair"         , 339.7693      , 2545.0022     , 16.7897},
    {"grove"        , 2481.0984     , -1699.1428    , 13.5266}
//add more here
};

//the command using y_commands if you need it zcmd just ask.
YCMD:tele(playerid, params[], help)
{
    #pragma unused params
    if(help){SendClientMessage(playerid, 0xFFCC33AA, "/tele : Teleport");}
    else
    {
       
        new i,aSize,strDialog[1024];
        aSize = sizeof(aPlayerTeleports);
        for (i=0;i<aSize;i++){
            if      (i==0) format(strDialog, sizeof (strDialog), "%s", aPlayerTeleports[i][ePT_Name]);
            else    format(strDialog, sizeof (strDialog), "%s\n%s",strDialog, aPlayerTeleports[i][ePT_Name]);  
        }

        ShowPlayerDialog(playerid, DIALOG_TELEPORTS, DIALOG_STYLE_LIST, "Teleport", strDialog, "Go!!", "Cancel");
    }
    return 1;
}



Re: [help]is the a ingame teleport maker... - [KHK]Khalid - 27.06.2012

Are you looking for this?


Re: [help]is the a ingame teleport maker... - [A]ndrei - 27.06.2012

downloaded and its not what i wait i need someone where i join my server login as rcon and say something like /createteleport drift and it will give me the corridinents after...



EDIT: I did not know but i can go into my server and type /save example and ill get the places :PP sorry.


Re: [help]is the a ingame teleport maker... - [MM]RoXoR[FS] - 27.06.2012

Just goo to place and type
pawn Код:
/save Drift
Coordinates will get saved in \\Documents\GTA San Andreas User Files\SAMP\savedpositions.txt