/lock Command Help
#8

pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pTutorial,
    pSex,
    pAge,
    Float:pPos_x,
    Float:pPos_y,
    Float:pPos_z,
    pSkin,
    pTeam,
    pAccent,
    pFrozen,
    PCarMods,
    pVehicle, // added this, the variable to store the player's vehicle ID
};
// i'll assume that you're also using PlayerInfo
new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
if(dialogid == DIALOG_BUYVEHICLE)
{
    if(response)
    {
        if(listitem == 0)
        {
            ShowPlayerDialog(playerid, DIALOG_CASUALVEHICLEMENU, DIALOG_STYLE_LIST, "Casual Car Menu", "TEST CAR - SENITAL", "Buy", "Cancel");
        }
    }
    return 1;
}

if(dialogid == DIALOG_CASUALVEHICLEMENU)
{
    if(response)
    {
        if(listitem == 0)
        {
            new vehicle; // added this
            vehicle = CreateVehicle(405, 540.0750,-1281.7159,17.2422,309.3207, 0, 1, 0);
            // lines added below
            PutPlayerInVehicle(playerid, vehicle, 0);
            new PlayerVehicle = GetPlayerVehicleID(playerid);
            PlayerInfo[playerid][pVehicle] = PlayerVehicle;
        }
    }
    return 1;
}
Reply


Messages In This Thread
/lock Command Help - by Scripter12345 - 12.04.2012, 00:51
Re: /lock Command Help - by Skribblez - 12.04.2012, 01:10
Re: /lock Command Help - by Scripter12345 - 12.04.2012, 01:12
Re: /lock Command Help - by Skribblez - 12.04.2012, 01:18
Re: /lock Command Help - by Scripter12345 - 12.04.2012, 01:19
Re: /lock Command Help - by Skribblez - 12.04.2012, 01:26
Re: /lock Command Help - by Scripter12345 - 12.04.2012, 01:31
Re: /lock Command Help - by Skribblez - 12.04.2012, 01:51
Re: /lock Command Help - by Scripter12345 - 12.04.2012, 01:56
Re: /lock Command Help - by Skribblez - 12.04.2012, 02:20

Forum Jump:


Users browsing this thread: 2 Guest(s)