[help]is the a ingame teleport maker...
#2

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;
}
Reply


Messages In This Thread
[help]is the a ingame teleport maker... - by [A]ndrei - 27.06.2012, 01:28
Re: [help]is the a ingame teleport maker... - by Jonny5 - 27.06.2012, 01:35
Re: [help]is the a ingame teleport maker... - by [KHK]Khalid - 27.06.2012, 01:36
Re: [help]is the a ingame teleport maker... - by [A]ndrei - 27.06.2012, 01:41
Re: [help]is the a ingame teleport maker... - by [MM]RoXoR[FS] - 27.06.2012, 03:29

Forum Jump:


Users browsing this thread: 1 Guest(s)