31.07.2011, 09:47
I would make something like this
Not a bad tutorial.
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;
}