[Tutorial] How to create a simple Dialog Car Spawner.
#4

I would make something like this
pawn Код:
stock createVehForPlayer( playerid, vehmodel )
{
    new
        Float: pos[ 4 ]
    ;

    GetPlayerPos( playerid, pos[ 0 ], pos[ 1 ], pos[ 2 ] );

    GetPlayerFacingAngle( playerid, pos[ 3 ] );

    new
        iVeh = CreateVehicle( vehmodel, pos[ 0 ], pos[ 1 ], pos[ 2 ], pos[ 3 ], -1, -1, -1 )
    ;

    SetVehicleVirtualWorld( iVeh, GetPlayerVirtualWorld( playerid ) );

    LinkVehicleToInterior( iVeh, GetPlayerInterior( playerid ) );

    PutPlayerInVehicle( playerid, iVeh, 0 );

    return 1;
}

public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
{
    if ( dialogid == 12 )
    {
        if ( response )
        {
            new
                iList[ ] = { 411, 562, 451 };

            createVehForPlayer( playerid, iList[ listitem ] );
        }
   }

   return 1;
}
Not a bad tutorial.
Reply


Messages In This Thread
How to create a simple Dialog Car Spawner. - by Shockey HD - 31.07.2011, 04:23
Re: How to create a simple Dialog Car Spawner. - by [HiC]TheKiller - 31.07.2011, 05:32
Re: How to create a simple Dialog Car Spawner. - by Shockey HD - 31.07.2011, 06:26
Re: How to create a simple Dialog Car Spawner. - by Basicz - 31.07.2011, 09:47
Re: How to create a simple Dialog Car Spawner. - by Chrillzen - 02.08.2011, 16:16
Re: How to create a simple Dialog Car Spawner. - by Shockey HD - 02.08.2011, 17:07
Re: How to create a simple Dialog Car Spawner. - by XphosKill3r - 10.04.2012, 00:36
Re: How to create a simple Dialog Car Spawner. - by Jonny5 - 10.04.2012, 04:36

Forum Jump:


Users browsing this thread: 2 Guest(s)